CakePHP vs Ruby on Rails. And the battle continues…
- Posted by Tengku Zahasman on September 12th, 2007 filed in Web Programming, PHP, CakePHP, Web App Development, Thoughts
- 12 Comments »
- (7,076 Views)
When the funny guys at RailsEnvy.com published a video comparing RubyOnRails with PHP, they received a lot of criticisms from the viewers for making an unfair comparison between jets and cars, when they should be comparing jets with jets. The viewers were right. PHP is a language. RubyOnRails is a framework. If they wanted to compare RubyOnRails with something, they should be comparing it with another “framework” instead of a language.
So here is the video commercial I’m talking about (I find these guys to be very entertaining):
Soon after they realized their mistake, they created another video comparing CakePHP with RubyOnRails to be fair to the PHP community. While it’s not really a “comparison”, I still find it so hilarious. Check it out 
LoL. These guys should seriously consider becoming movie actors
Anyway, it’s true that CakePHP functions the same way RoR works, and I don’t think any Cake Bakers would deny that Cake was initially designed to work like RoR, only in PHP. In fact, there were times when CakePHP used to be nicknamed as “PHP on Rails”. But the way I see it, CakePHP is starting to move on its own way now and becoming more independent the more it grows. Bravo to the CakePHP developers!
CakePHP vs Ruby On Rails. Which is the better framework?
It’s not for me to judge since I never fiddled around much with RubyOnRails before.. at least not as seriously.
What I do know is that both of them follow the MVC design pattern. Both adhere to the “Convention over Configuration” philosophy and Don’t Repeat Yourself (DRY) concept. Both of them also support AJAX. They have an almost identical directory structure. They’re built with testing in mind. They are very OOP-like. They have their own shells for command-line interface stuffs. They both support caching. They support different databases (MySQL, PostgreSQL, etc…). And they’re both released under the MIT license.
The reason why I’m sticking with CakePHP instead of jumping into the RoR bandwagon is because I know I’m already fluent in PHP, so why would I want to learn a new language (Ruby) and a new framework (Rails) when I already have a very Rails-like framework written in PHP? If you strip off “Rails” from Ruby, you’ll realize that Ruby is just another programming language. Sometimes I keep wondering myself why some of those hardcore PHP-ers would migrate completely to RoR and go through the hassles of learning the new syntaxes & built-in functions of Ruby all over again when there’s Cake that does almost entirely the same thing. Even the 37signals guys (the brilliant minds behind RoR) uses PHP in many of their sites. Get real.
To set things straight, RubyOnRails is an awesome framework and I have nothing against it. CakePHP is also an awesome framework. I am no way saying that one is better than the other. They both have their own place and strengths in the web development scene. What I’m saying is unless you want to learn all the programming languages that exists out there, why not just stick with the language you’re currently strong at and use the available framework which works with your favorite language to build the applications of your dream. Save “learning a new language” for your next spare-time hobby. 
Comparing Web Application development frameworks
- Posted by Tengku Zahasman on June 12th, 2007 filed in CakePHP, Web App Development
- 1 Comment »
- (2,556 Views)
This is an interesting video I found on Google video which shows a practical comparison between developing web apps using J2EE, Zope/Plone, Ruby on Rails, TurboGears and DJango, all of which are different application frameworks utilizing various programming/scripting languages like Java, Ruby and Python. Although I mainly build applications using PHP (recently adopting CakePHP as the framework), it’s also interesting to see how other developers develop web applications using different languages and frameworks. Afterall, since CakePHP’s structure is also based on Ruby on Rails, I watched the video by assuming RoR’s advantages/disadvantages to be that of CakePHP’s. If in case you don’t know why it’s better to adopt a Web Application framework instead of writing codes from scratch, here’s why.
Current web developers will certainly appreciate this. For those of you who’s not really into programming, at least this video will give you an idea how people write Web applications. It’s quite a lenghty video (around 40 minutes in total) so sit back, relax, and enjoy the show:
If you’re wondering which Web Application framework you should use, just ask yourself which programming language that you’re highly familiar with, find a framework that uses that language, read about it a bit, and then stick to it. Jumping from frameworks to frameworks will only bring you nowhere. For PHP developers, CakePHP or CodeIgniter are a few good options to look at 


If I've provided some info that you find to be useful, don't hesitate to