PHP Frameworks: Which one is the best for me? (Part 1)

Sunday, December 28, 2008

Before I get started I'd like to tell you that this is going to be a YAPFP but the purpose of it is to enlighten all those that are still in the beginning with some interesting tips, opinions and links.

So what could be a good reason to make someone use a framework? I'm sure that that everyone that enjoys coding (and development in general) wishes to become more productive by the time. He (or she) wants his code to look solid, to be easy to extend and refactor (in other words maintainable), to keep sure that he plays by the rules of KISS and DRY, spent time on something creative (and fun) rather than wasting time on common tasks (validation, form creation etc), have a good documentation with real life scenarios, and the list goes on. Many of these goals lets say is easy to accomplish when you follow the guidelines that others who have-been-there-done-them have set.

Lets say that you decided to get started with a framework. Great! But which one would be the one that covers your needs? Which one has the smaller learning curve compared to the features it offers? It's hard to have one straight answer for questions like these... I would suggest to try a couple of them on the same scenario, something small but basic and useful... lets say a CMS with some basic CRUD actions.

At first site this might not look challenging but lets consider what a project like this could include:

  • User Authorization
  • Hierarchical stored data
  • Access Control List
  • Content types
  • RSS Feeds
  • I18n and I10n
As you can see the list includes all the features that come with every open source CMS that works out of the box. The list could go on but lets keep it "short" for the time being.

So far I have worked with the Zend Framework, CakePHP and qCodo, and these three are going to be our tools during the whole thing. Please keep in mind that the purpose of these post series is to show you by example a possible use of each framework (nothing should be taken for granted) and not to make a final verdict such us "The XXX framework is the BEST! Everything should be eliminated!"

Zend Frameworks links:

CakePHP links:

qCodo links: