Why I use CakePHP over Ruby on Rails

[Update for all visitors: I’ve written a new post name Why I Prefer Ruby on Rails over CakePHP. Please visit that for a more up to date opinion.]

In response to Blake’s question on my last post “Why I Like CakePHP”, the main reason is that I still use CakePHP over Ruby on Rails is availability of php programmers. It’s a lot easier to find someone who does php than it is to find someone who does Ruby.

Also, if we are building projects that will eventually be deployed on a client’s server, the client will eventually need to maintain it. It is easier for them to support a php solution over a Ruby on Rails solution because because they will find more people familiar with php than ruby.

For a comparison of language popularity, although I realize this doesn’t say it all, here is a Google Trends chart comparing php with ruby.

PHP, Ruby comparison

PHP is in blue, and Ruby is in red.

Now I admit that Ruby on Rails is a superior product over CakePHP. Rails was built for a language like Ruby, not for php. However, php does a good enough job with handling the Rails-like MVC framework. All that said, I wish Ruby was more popular because it would be fun to jump into.

It seems that a lot of the php community, including myself, have become very framework-centric. I think this stems from frustrating hours/days/weeks of digging through spaghetti code, trying to debug php applications.

Because of the immense popularity of php, I think one of the php MVC frameworks will catch fire and surpass Rails in popularity.

4 thoughts on “Why I use CakePHP over Ruby on Rails”

  1. Yeah, that trend comparison is whack. You’re comparing a scripting language to a framework. Try comparing PHP/Cake to Ruby on Rails, heck, even PHP framework to Rails would do.

    Don’t get me wrong, I have been building PHP based sites for 5 years and will continue to do so (so long as rails doesn’t completely take over our efforts). But when it comes to web scripting frameworks, RoR is leagues ahead of the competition.

  2. No, Ruby is a scripting language and PHP is a scripting language. That is my point. There are more programmers familiar with the PHP scripting language than the Ruby scripting language.

    Currently, Rails is a more popular framework than Cake. That is why my last paragraph states “I think one of the php MVC frameworks will catch fire and surpass Rails in popularity.”

  3. Koustubh,

    I’m not quite sure I understand the question. You can either have multiple instances of cakePHP on your server for each project, or you can create a new app directory for each new project.

    For example, you can have a directory structure such as:
    /project_name/app/[all project files]
    /project_name/cake/[all project files]
    /project2_name/app/
    /project2_name/cake/

    or you can do something like:
    cake_projects/cake/
    cake_projects/app1/
    cake_projects/app2/

    If you do it the second way, you will need to point Apache to the app/webroot/ directory for each project.

    I hope this helps.

Comments are closed.