CakePHP vs Django vs Rails vs Who Cares - Make a Decision

As someone who:

  1. has made a framework choice, and developed numerous projects on that framework (CakePHP) and,
  2. is always poking around with other frameworks

I am often asked about the tough choice of picking among all the great framework choices (both in and out of the PHP world).  My advice is always the same.

Who Cares - Make a Decision

Getting stuck in choice limbo is bad for many reasons.  Perhaps the biggest one of all has to do with inaction.  If you are unsure which framework to choose from, chances are pretty good you’re not writing code or being as productive as you could be.  If you’re not writing code than you’re not starting the process of getting over one or more learning curves (every framework will carry a learning curve … if you choose a framework outside of a language you are familiar with, than you’ll have many learning curves to get over).

Go Easy on Yourself

I would recommend selecting a framework in a language that you are already familiar with.  If you are a PHP person, choose a PHP framework.  If you are a Python person, choose from a Python framework.  If you are a Ruby person, choose from a Ruby framework.  Just pick one and go with it, but don’t make the task any more difficult than it needs to be.

Life After a Few Applications

You won’t get anywhere with your choice unless you write a few applications with your chosen framework.  You’ll find (and this is the good part), that after you gain the confidence you can only gain by getting your hands dirty, you’ll more easily be able to transition into another framework.  Once you gain a firm grasp on the concepts of MVC, it’s amazing how familiar other MVC frameworks will look.  If after a few projects you feel as though you’ve made a poor choice, choose something else.  Your new found confidence and experience should make the transition much less painful.

Should you Choose a Framework

If you look for them, you’ll find more opinions regarding frameworks than you could possibly care to read.  My personal feeling is that:

  1. unless you are writing an application that can’t afford the performance penalty that is likely to come along with any framework (perhaps < .005% of applications on the Internet are in this category, and congratulations if you are working on one), or
  2. you are working on an application that doesn’t need a framework to begin with, or
  3. you shouldn’t be writing a custom application (when perhaps the best thing you can do for your client is choose a proven CMS … one that eases content management/maintenance/etc) than

Yes, you should choose a framework.  A good framework will help you stay organized, will remove a lot of mundane (but won’t remove the need for you to be responsible!), and will come packaged with proven, maintained, debuged, tested, cared for, etc, code.

You’re Also Choosing a Community

It’s not all about the code.  Though a framework won’t do your job for you, it can help you be better at your job.  Part of getting better is learning, and choosing a framework with a good community will help you learn.  Whatever you choose, either be involved or observe the community.  Admittedly, I am not very involved in the CakePHP community (for many reasons … including the fact that I develop in .Net, Classic ASP, and Python).  But I am constantly observing the community.  I receive a daily digest of Google Group postings, I occasionally follow conversations on IRC, and I read ~20 blogs having something to do with CakePHP.  I follow the community even though it’s been more than 2 months since I’ve developed in CakePHP.  I’ve made a commitment to this framework and I would be doing myself a disservice by not maintaining some sort of connection to the community.

Last Thoughts

In case I haven’t been clear about this: JUST MAKE A CHOICE and don’t worry about it.  Just make a choice and develop a few real applications with your choice.  If you’re worried about making the wrong choice, don’t be.  If you’re asking if you should choose framework X or framework Y, than you’re wasting time.  Making a choice is liberating.  Liberate yourself and start coding.

Even though you are choosing a framework, never stop learning/reading the language in which the framework is written.  I sometimes code with CakePHP, however I read PHP books/blogs/magazines that have nothing to do with CakePHP.  I read programming books/blogs/magazines so that I can be a better developer.  Try to remember that you are a programmer first; you are a PHP/Python/PERL/Ruby/etc programmer second; and you are a CakePHP/Django/Rails/etc developer third.

9 Comments for "CakePHP vs Django vs Rails vs Who Cares - Make a Decision"

Comment 1 noiz777 - Gravatar noiz777

Thanks 4 the advise...i was just struggling with this lately, now i feel more comfortable with making my choice

Sat, 21 Feb 2009 11:19:17 +0000 Link

Comment 2 leveille - Gravatar leveille

@noiz777: No problem at all. What did you end up choosing for a framework?

Sat, 21 Feb 2009 15:30:44 +0000 Link

Comment 3 KANG Ghee Keong - Gravatar KANG Ghee Keong

Haha. I'm another one who is faced with this choice. Surprisingly difficult but yes, your best advise yet, is to pick a community.

I'm inclined to choose CakePHP, as this one has a great bunch in my neighborhood meeting monthly just to chat!

Mon, 09 Mar 2009 01:39:13 +0000 Link

Comment 4 Beto Aveiga - Gravatar Beto Aveiga

Más claro que eso... imposible. Quedarse en la indecisión usualmente cobra un precio más alto que decidirse por un framework no tan apropiado.
Y como diría el Chapulín Colorado: "Lo sospeché desde un principio".

Acostumbro desarrollar sitios con Drupal, pero ahora particularmente tengo un sistema con requerimientos muy "caprichosos" lo que me exige -IMHO- utilizar código propio.

Me he decidido por empezar con CI.

Gracias por el post.

Wed, 25 Mar 2009 03:03:31 +0000 Link

Comment 5 Jagtesh Chadha - Gravatar Jagtesh Chadha

Muchos gracias!


Having worked on PHP with Symfony for long, I always ached for community support. I realise that it maybe better today (I haven't used Symfony in a year), but it can't best RoR! My choice is pretty clear, thanks to you :)

Thu, 25 Jun 2009 15:02:04 +0000 Link

Comment 6 Pablo - Gravatar Pablo

I totally agree with you. Making the choice is the most important thing.

I've chosen Symfony and don't regret it. There are many quality frameworks and each has its niche. Symfony seems the most complete, with the best community and great future.

Thu, 25 Jun 2009 15:53:29 +0000 Link

Comment 7 calculating poker odds - Gravatar calculating poker odds

Some developers need to get real on this "rivalry." Hey, if you're doing open source, use whatever the heck you want, who cares... But software companies incur huge expenses to move all their development from one environment to another. PHP dominated first, not Ruby, so it makes more practical sense for the large PHP community out there to utilize a PHP framework.Thanks for the update.

Sat, 11 Jul 2009 00:07:28 +0000 Link

Comment 8 Jason Leveille - Gravatar Jason Leveille

Thanks for your comment. I don't think my article insinuated that you should have a "who cares" attitude with regards to frameworks. Nor did I suggest that software companies move their development from one environment to another. Of course, software companies heavily invested in PHP will most likely continue to use PHP products.

What is a reality is that there are many great languages out there, and many great framework options. As I said in my article, we are programmers first and PHP/whatever programmers second. As developers, I think we have a responsibility to continually learn. This includes learning new languages (and frameworks). If your field of vision only has room for PHP, that is your prerogative.

I program in PHP 90% of the time in my day job, however that doesn't mean that I can't learn from other languages/frameworks. This blog is a great example. I wanted to learn Python and a Python framework. So, I built it using Pylons, on my own time ... and I'm a now a better developer for it.

Sat, 11 Jul 2009 08:08:29 +0000 Link

Comment 9 Rijas PA - Gravatar Rijas PA

Ceke php and ruby seems slower , than django.

Wed, 16 Dec 2009 08:39:57 +0000 Link

Comments have been disabled for this post.