Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.
« Mighty Mouse Kryptonite and Exceeding Expectations
Michigan Taxes Graphic Design Services »

Ruby versus PHP or There and Back Again

September 23rd, 2007

Well, I imagine that this opinion piece by Derick Silvers will cause some conversations: 7 reasons I switched back to PHP after 2 years on Rails. The gist being that a big bang rewrite of an existing code base is always a risk and that Rails is optimized more for the greenfield case. He talks about the beauty and power of coding in native SQL instead of database abstraction layers. I am sympathetic to that idea. He mentions hosting in that PHP is small and fast. To which I would add widely available and well known. He asks

IS THERE ANYTHING RAILS/RUBY CAN DO THAT PHP CAN’T DO?

And answers No with the comment

…when I took a real emotionless non-prejudiced look at it, I realized the language didn’t matter that much.

Now I disagree a bit here. It just happens that Ruby and PHP are equivalent in many of the ways that are important. See my post on comparing languages. PHP has some advantages with maturity, while ruby has some constructs, such as closures, that can do wonders in the hands of a skilled programmer. Yet, Ruby also has some disadvantages. I’d summarize that by saying it has all of the maintainability of perl with the commercial attitude of smalltalk.

One of the biggest themes of the 7 reasons piece is that he was able to bring much of what he learned from his 2 year failed rewrite in Ruby back to his PHP version. But, PHP is a different world today than it was two years ago when he made the decision to leave it for Ruby. PHP 5 is a more viable option. Additionally, the PHP community has learned from Rails. Some of the things that made the Rails framework a step ahead, for example routing and url helpers, are now widely available in the PHP world for those who want to use them.

Welcome back, we kept the light on.

Filed Under

  • Misc

Related Posts

  • PHP Book sales trends versus Java and Ruby
  • Comparing PHP with other languages
  • Keywords and Language Simplicity
  • Programming Language Trends via Google
  • PHP versus ASP
You can leave a response, or trackback from your own site.

21 Responses to “Ruby versus PHP or There and Back Again”

  1. Patrick Mueller says:
    9/23/2007 at 10:16 am

    I understand the maintainability of perl, but not so much the commercial attitude of smalltalk. Are you implying that Smalltalk never had good vendor-y, commercial support? Kinda like Ruby today? Because that’s not true; in the 90’s the only way to play with Smalltalk was to buy a very highly priced runtime from a vendor. Ah … those were the good days; I worked for one of those vendors.

  2. Paul M. Jones » Blog Archive » “Is there anything Rails can do that PHP cannot do? *No.*” says:
    9/23/2007 at 11:08 am

    [...] Jeff Moore has related and insightful comments. [...]

  3. Paul M. Jones says:
    9/23/2007 at 11:57 am

    Hi Jeff –

    But, PHP is a different world today than it was two years ago when he made the decision to leave it for Ruby. PHP 5 is a more viable option.

    Indeed; the same is true (perhaps more so) for Rails itself, which was built at a time when the dominant PHP version was still 4.x.

  4. developercast.com » O’Reilly Ruby Blog: 7 reasons I switched back to PHP after 2 years on Rails says:
    9/24/2007 at 7:44 am

    [...] Jeff Moore – “Ruby versus PHP or There and Back Again”   [...]

  5. Nate Klaiber says:
    9/24/2007 at 8:37 am

    I appreciated his article and thought it was written very well. The one thing that I particularly enjoyed is his statement about SQL. Everyone thinks they need to avoid it like the plague, I happen to really enjoy it. I have found with Ruby that most of the time I end up using the find_by_sql statement because I have more control of the performance and end result. I did the same when I worked with PHP.

    You are also correct in that PHP has matured over the past 2 years.

  6. Morgan Craft says:
    9/24/2007 at 9:27 am

    He talks about the beauty and power of coding in native SQL instead of database abstraction layers.

    Amen!

  7. Travis Swicegood says:
    9/24/2007 at 11:00 am

    Oh come on Jeff, you’ve got to know that languages are just a vehicle and in the grand scheme of things don’t really matter that much… Well, unless you’re showing up to race a formula one event with a Pinto :-D

    Seriously though, its ashamed to see people drop Ruby – or any language really – simply because the framework they chose didn’t work out for them. It’d be like dropping PHP because (insert favorite framework, Zend, Cake, Solar, CodeIgnitor, etc.) didn’t work for them.

  8. PHPRomania Blog » Blog Archive » PHP vs Ruby says:
    9/24/2007 at 11:40 am

    [...] * Elizabeth Naramore – “Derek Sivers’ Article on RoR vs PHP” * Paul Jones – “Is there anything Rails can do that PHP cannot do? *No.*” * Terry Chay – “Why PHP triumphs over Ruby” * Jeff Moore – “Ruby versus PHP or There and Back Again” [...]

  9. All Night Coder - Today’s Top Blog Posts on Programming - Powered by SocialRank says:
    10/1/2007 at 5:10 am

    [...] Ruby versus PHP or There and Back Again [...]

  10. All Night Coder - Today’s Top Blog Posts on Programming - Powered by SocialRank says:
    10/1/2007 at 5:11 am

    [...] Ruby versus PHP or There and Back Again – Professional PHP [...]

  11. Ruby Galore - Today Top Blog Posts on Ruby on Rails - Powered by SocialRank says:
    10/9/2007 at 1:04 am

    [...] Ruby versus PHP or There and Back Again [...]

  12. Nytt om webb » Facebook och PHP says:
    11/11/2007 at 2:25 am

    [...] Jeff Moore – “Ruby versus PHP or There and Back Again” [...]

  13. Amit says:
    3/13/2009 at 8:32 am

    Well, what would you suggest for a newbe?

    I want to program for website developing,
    I know a bit of PHP coding, and want to go with programing seriously.

    Will it be wise to invest all efforts on PHP or go with the Ruby?

    Thanks,
    Amit

  14. Stuart says:
    5/6/2009 at 5:09 pm

    It’s true, there’s not much that Ruby can’t do tbh.

    Coupled with the fact that you can do a large amount of the boring stuff quickly & easily it gives you much more coding time to pump into the stuff that matters.

  15. Hari K T says:
    7/11/2009 at 2:57 am

    Me too was hearing about the Ruby on Rails for a long time . I was thinking whats inside it ? And does it have more power than PHP .
    I thought of reading about Ruby on Rails , I came to know that Rails is a framework to support Ruby language .
    Like Rails PHP too have a list of frameworks , like zend, cake, symfony , codeigniter etc.
    Then why I need to switch to Ruby :) . Am I right ?

    I hope PHP with some frameworks can do what Ruby with Rails is doing .

    Thanks

  16. ??????? » [Web] ???? says:
    11/24/2009 at 7:52 pm

    [...] Ruby versus PHP or There and Back Again [...]

  17. Amsterdam says:
    2/2/2010 at 4:36 pm

    For the moment we use Codeigniter and we are happy with it…but seems like Ruby “can do wonders in the hands of a skilled programmer”. Do you think that i should adopt Ruby if i m not a highly skilled programmer?

  18. Solar Pumps says:
    3/3/2010 at 4:51 am

    Spectacular, I’ve been looking for something this good. I’ll subscribe for more later

  19. Acheter Nike Air Max says:
    11/14/2011 at 2:06 am

    dédouanement. Bon de réduction peut être eu avec ces magasins si vous êtes disposé à régler pour les gants

  20. Chaussre Air Jordan says:
    11/14/2011 at 2:07 am

    vue de face montrant sur un fond blanc. Le visage doit être comprise entre 1 et 1 3 / 8 pouces à partir du menton au sommet de la tête. Chapeaux, coiffures et uniformes, sauf mot de vêtements religieux quotidiens ne peuvent pas être portés.

  21. bratari din aur barbati says:
    4/11/2012 at 10:25 am

    With havin so much content do you ever run into any problems of plagorism or copyright violation? My site has a lot of exclusive content I’ve either authored myself or outsourced but it looks like a lot of it is popping it up all over the internet without my authorization. Do you know any solutions to help protect against content from being stolen? I’d truly appreciate it.

Leave a Reply

Click here to cancel reply.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

code: use [code=php][/code].

Comment Preview

    Subscribe Feed
    Share Subscribe to this blog…
    Share Bookmark or share this page…
  • About

    My name is Jeff Moore. I'm a PHP programmer living in San Francico and working for a startup.

    More about me…

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (18)
    • Open Source (14)
    • PHP (99)
    • Software Design (29)
    • Usability (14)
    • Web Design (20)
  • Recent Comments

    • The Legality of Republishing RSS Feeds  28
      Tory Rennemeyer, eenicker, Reverse Phone Lookup [...]
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)  258
      Tuan Lal, Lavagem de estofados, Edward L. Kind [...]
    • php | tek 2008  36
      how to mend ice machine, Akademija Debelih, Odbacena [...]
    • goto in PHP  59
      kasor, Thomas Valdivieso, Murray Ziadie [...]
    • Firefox Extensions for Web Developers  33
      kasor, Website Design Toronto, mobila bistrita [...]
    • Why PHP is easier to learn than Java  68
      kasor, Justina Calvery, Guy Lipton [...]
    • Meta Tag Refresh Faux Paux  43
      html email templates, E-Juice Reviews, image [...]
    • Improved Error Messages in PHP 5  49
      Carroll Tina, Przeprowadzka, Emery Harari [...]
    • Benchmarking PHP's Magic Methods  33
      kayu oyunlar?,dora,oyun,oyna, Benjamin Bejjani, paypal website [...]
    • Microbenchmarks of single and double qouting.  24
      kefir grains minneapolis, sexshop dildo, tuim688 [...]
  • Recent Posts

    • Richard Thomas
    • ZendCon: Writing Maintainable PHP Code
    • Looking Towards the Cloud
    • Holiday Tech Support
    • Closures are coming to PHP
    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
  • Site

    • Archives
    • Log in
  • Search