As someone who:
- has made a framework choice, and developed numerous projects on that framework (CakePHP) and,
- 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 a Python framework. If you are a Ruby person, choose 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
- 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
- you are working on an application that doesn’t need a framework to begin with, or
- 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.
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.