PHP vs Ruby on Rails

Over the past many months, I have seen many articles explaining how PHP is a bad programming language for various reasons. This one is the only one I have read which gives a well thought out reason for it though.

PHP has long been considered something of a standard in modern web development.  Comparatively, Java and .Net have their respective camps, but I’m not sure they match the market-penetration, if you will, that PHP has enjoyed.  And yet, PHP feels like an unintutive language.

To me, PHP has been the C++ of the web world.  Yeah, it’s powerful and can do pretty much anything, but it doesn’t exactly feel good to code with it.

This seems to me to be a fair statement. The article goes on to explain how Ruby on Rails is a much more elegant language and based on my extremely limited experience with RoR, I probably agree. But my argument against that is this:

Rails is a framework. Ruby is the language. PHP is just a language. A lot of effort has been put into Rails to make it easy to use and that effort has paid off for them. Well enough so that people tend to forget that Ruby on Rails is not a language in and of itself.

There are many frameworks that have been written for PHP. Perhaps the most popular at the moment is the Zend Framework. I have used bits and pieces of this in projects for Cornell and it has done well. Another good one is CakePHP which I have started (though never finished) a couple of projects with.

Working with both of these frameworks is much easier (in some cases) than working with the core of PHP. But at the same time, it is extremely easy for me to put together a quick site using the core of PHP and deploy it on just about any host available. A Rails project (as best as I can tell) requires much more effort to create a deploy.

Published by Brian

Application Developer at the University of Iowa. Works mostly with PHP/Oracle, but doesn't like the Oracle bits. Also an avid gamer and tinkerer.

One reply on “PHP vs Ruby on Rails”

  1. You’re right about that, and after reading your comment I put it into a little more consideration. I’d suspect that making use of a PHP framework would be about as useful and intuitive as making use of Rails – which is really where the power of Ruby shines.

    And deployment of a Rails app is definitely easier said than done. I’m interested in trying out Zend and seeing if it would work for me. If so, I have a lot of ideas I could rapidly put it to use with…

Comments are closed.