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.

categories Misc
tags No Tags

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.

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

  1. #1 Patrick Mueller responds...
    September 23rd, 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.*” pingbacked on September 23rd, 2007 at 11:08 am
  3. #3 Paul M. Jones responds...
    September 23rd, 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 pingbacked on September 24th, 2007 at 7:44 am
  5. #5 Nate Klaiber responds...
    September 24th, 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. #6 Morgan Craft responds...
    September 24th, 2007 at 9:27 am

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

    Amen!

  7. #7 Travis Swicegood responds...
    September 24th, 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 pingbacked on September 24th, 2007 at 11:40 am
  9. All Night Coder - Today’s Top Blog Posts on Programming - Powered by SocialRank pingbacked on October 1st, 2007 at 5:10 am
  10. All Night Coder - Today’s Top Blog Posts on Programming - Powered by SocialRank pingbacked on October 1st, 2007 at 5:11 am
  11. Ruby Galore - Today Top Blog Posts on Ruby on Rails - Powered by SocialRank pingbacked on October 9th, 2007 at 1:04 am
  12. Nytt om webb » Facebook och PHP pingbacked on November 11th, 2007 at 2:25 am

Leave a Reply

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

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

Comment Preview

  • Search

  • Subscribe

    Subscribe All Posts
    Subscribe All Comments
    Subscribe All Bookmarks
    Subscribe with Bloglines Subscribe with My Yahoo Add to netvibes Subscribe in NewsGator Online Subscribe with Google feed reader
  • Share This

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (16)
    • Open Source (14)
    • PHP (93)
    • Software Design (27)
    • Usability (14)
    • WACT (7)
    • Web Design (20)
  • Recent Comments

    • How to Transfer Mac OS X Application Data between Computers  34
      Khaled bin Alwaleed, Oscar, TeeJay [...]
    • Sarah Snow Stever  23
      Snowcore, ennah, Philippine Website Developers [...]
    • PHP Development From Java Architects Eye  9
      Bobrila, FelhoBacsi, Angsuman Chakraborty [...]
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)  82
      Luis Oscar Cruz, xentek, website design [...]
    • Improved Error Messages in PHP 5  9
      ennah, Khumaer, retry [...]
    • The value of MVC  7
      Vulchak, อะไหล่แอร์, Derek Scruggs [...]
    • Why PHP is easier to learn than Java  13
      , , WTF [...]
    • goto in PHP  38
      Goldilocks, , SFM [...]
    • Keywords and Language Simplicity  6
      Handy, minikperi, PHP Encoder [...]
    • OOP is Mature, not Dead  13
      deltawing, asd, Coen [...]
    • WordPress BBCode Plugin  21
      wow, Márcio Pereira, lucas03 [...]
  • Pages

    • Tags
  • Recent Posts

    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)
    • Keywords and Language Simplicity
    • Improved Error Messages in PHP 5
    • Michigan Taxes Graphic Design Services
    • Ruby versus PHP or There and Back Again
    • Mighty Mouse Kryptonite and Exceeding Expectations
    • reCAPTCHA - Combining Distributed Problem Solving with a Web Service
  • Archives

    • 2007: Jan Feb Mar Apr May Sep Oct Nov
    • 2006: Jan Feb Mar Apr May Jun Jul Oct Nov Dec
    • 2005: Jan Feb Mar Apr May Sep Oct Nov Dec
    • 2004: Apr May Jun Jul Aug Sep Oct Nov
  • Menu

    • Register
    • Login