PHP Frameworks – a Conclusion

We've looked at what a framework is, what to look for in a framework, PHP framework benchmarks, and the features of the current leading PHP frameworks. I'd like to back off a notch, and take the 50,000 foot view of frameworks.

Web developers use frameworks to make their development go quicker, easier, and more organized. This ultimately leads to repeatability. If I use the same framework each time I develop a web application, often times I can repeat what I've already written in a previous application, and the frameworks syntax and organization is already known to me. Everything becomes quicker. For those doing freelance development, quicker means more development jobs, and ultimately more money.

Since I want to complete my applications quicker, I want the framework to help me do that, or else why would I use it. Things I want the framework to help me with are things like validation, forms, the database , internationalization, ajax, and security. Here's what I ideally want from a framework.

  • Built in security. I want to know if I use the framework, my application will be secure from hackers.
  • I want my classes to be automatically loaded through out the application, instead of having to remember where they are located and have to physically load them, called an autoloader.
  • I want a way to translate database sql to objects and make my interaction with a relational database easier, called an ORM.
  • A logical organization of files and places to put the various types of files I have so that everything works well together
  • A rich set of helper applications to make my coding go faster and more intuitive.
  • A way to make my URL's easier to read and thus, easier to categorize by the search engines.
  • I want a quick framework. I already give up some speed by using a framework. I don't want my customers saying my application is a dog.

All of the above is goodness, but most important is I don't want to have to spend hours having to figure out how to use the framework. The framework should be easy to learn, with good documentation leading me into each section of the code. Good documentation explains what that section is about, and gives you a code snippet to show you how to use it and the syntax.

When I'm knee deep in an application, and run into a problem, I want to know I can get some help if not from the documentation, then from an active forum.

You may not have a choice of what framework you use. You might join a company that has already standardized on a framework, and you'll have no choice, but to learn that framework. For the freelancers out there, let's take a final look at the current frameworks from the above perspective.

  • In the relatively slow category, I would put the following frameworks, Cake, Symfony1.2.4, and Zend.
  • In the not well supported, or used, I would place: Fuse and Solar.
  • In the, rails-like, and slow category: Akelos and Qcodo. This may be tad unfair, since there was only one Akelos benchmark, and no Qcodo benchmark, but my thought is the code generation overhead may get in the way of the speed. We need more benchmarks on these two to tell.
  • In the new architecture, or new versions, and not yet well documented category, I'd place: Kohana 3 and Symfony 2, which is not yet officially released.
  • In the not all PHP5 object-oriented class: Codeigniter.
  • In the light on security and features class: DooPHP.

The way I see it that leaves you with only one framework left standing, Yii. Yii is quick, PHP5 only, has good security, a good user community, and good documentation. Yii uses a slightly different architecture then straight MVC, but it's not that far off and seems easy to grasp.

DooPHP, the quickest of the bunch, is still relatively new and light on features, like security, but it is well documented if you want to go really light. Both should be relatively easy to learn.

That's the story, but only at this point in time, June, 2010. I don't see Cake, Akelos, Zend, and probably Qcodo changing much in speed or architecture in the future. Symfony2 is certainly fast enough to be considered, if the learning curve is easier, it too would be a viable candidate. Codeigniter 2, whenever that comes, could blow us away. And finally, Kohana 3 could really improve their documentation over the next couple of months to regain its former high rating, and become more than a viable contender, only time will tell. Chow.

Comments are closed.