PHP to Ruby on Rails
(pdf download)
2009-07-12 14:16:11
While away on my anual leave, I read the book 'Rails for PHP Developers'. What a mistake! Not because the book was bad, actually I thought the authors did a great job - well done guys! However it made me realise how incomplete and childish php is as a language. I appreciate there are many great web applications out there built with PHP and they are doing an excellent job; I mean going down to a lower level (thats probably the wrong expression to use as Ruby on Rails is a very high level language), but you know what I mean...going under the hood of the web application that one would see in their web browser (hopefully any web browser other than IE - but that is another story). Ruby and PHP are approximately the same age, where as PHP was designed for the web and Ruby was more of a general purpose language; however, with Ruby's MVC Framework 'Ruby on Rails', Ruby too can easily be used for the web. Recently I have been using Zend's MVC Framework (ZF) and I have realised how great it is, for so many reasons (which I will not go into now), but even comparing that to Ruby on Rails Zend Framework seems way behind. Ruby has definitely been the under dog, but why you may ask (I do too!) and will this continue to be the case? - Ruby on Rails can do what PHP can and more, plus is more human readable so easy to pick up and follow existing projects. I know some of you real cool geeks are saying under your breath but efficiency; efficiency is probably out of the scope of this article, as I wish to keep it short and sweet, however I will do some bench mark tests between the two in the near future and address the results in its own article - as a guess I would think PHP and Zend Framework would be more efficient when going toe to toe with Ruby on Rails.
Now some of you are thinking, is Eddie going to swap to Ruby on Rails? The answer at the moment is unfortunately NO - said with a sad face. After many years of developing in PHP and my current role being a PHP developer position, it would not be wise for me to split my focus - as for those of you who know me, once I decide on learning/using a new language I would spend every minute trying to become the best in that area. I definitely will put it near the top of my 'To Do' list and if I get a few spare moments I may also buy another Ruby on Rails book and a Ruby book - I'll keep you posted!
Resource: Rails for PHP Developers by Derek DeVries and Mike Naberezny