Rails makes you think you can
Tuesday, April 21st, 2009I spent a couple of hours last weekend going over a Rails app I wrote almost two years ago. It was the very first Rails application I had written (apart from the follow-the-screencast throwaway ones) and I couldn’t help cringing when I saw the code I got paid good money to write.
That app is still my most ambitious project ever and I’m still shocked I decided to do it in Ruby (a language I barely knew) and Rails (after playing with it for a few weeks) when I had a couple of years experience in PHP and some production apps already running on CodeIgniter. I guess it was the hype.
However, almost two years later and the app is still running smoothly (I had to tweak it a bit over the weekend). I am still not sure I would have taken on the project – an internal stock trading app with a social angle to it (I was freelancing then and working alone) if I had to do it PHP but in retrospect it would probably have been done better in PHP. I’d have had less fun though.
Rails is so deceptively simple it makes you feel you’re a superstar programmer even when you just have a couple of lines of code under your belt. However, after working with it for a while, you start to appreciate how complex it is to get things done when they don’t fall into the Ruby on Rails sweet spot. I wouldn’t have it any other way though. When it rocks, it really rocks.
I currently use PHP (and the Zend Framework) at work and I have come to appreciate the flexibility of ZF but I wouldn’t recommend the framework for programming beginners. Using a lot of the components requires a good grasp of programming concepts and compared to Rails where components are written for specific use cases, with ZF, you have to come up with yours. I am currently still trying to figure out where I can use Zend_Navigation in the recently released version of ZF. I know it will come in useful but I just have to tweak and flesh it out to make it work for me and that pretty much sums up the ZF-Rails differences quite well. One makes you think you can without even trying while with the other, you know you can but you’ll just have to work at it.

