PHP Frameworks – A Selection Criteria

We talked about what a framework is and why you'd want to use a framework. Since there are over 70 PHP Frameworks, how do you select one from another? What are some of the things you ought to consider?

Frameworks try to be unique. There is no reason a developer, or group of developers would want to write, "just another framework." They would take the time to write a framework only if they thought they had something unique to offer technically that no one else had done before. Isn't it that way with all products, each one is different, maybe slightly so, but different and unique.

Having said that, it might surprise you to know, that technical features are not the main criteria I use for picking one framework over another. Sure it matters, but there are additional reasons you should consider, that to me, weigh a tad more.

Number one on my list is documentation. Each framework has its own unique syntax, unique naming conventions, unique methods of organization, and unique methods of working within the framework to achieve a finished web site. It's not enough just to release the source code, and be done with the project. How do you use the framework, what functions and classes are available for use? The only way to know is through documentation. The developers have to tell us.

What constitutes good documentation? Things I like are an introduction to a section of content telling in general terms what that section is about, and how it is laid out, followed by examples of syntax and usage. Ideally, a snippet of code that accomplishes a small task using the function or class. A good API where an index of functionality is listed separately is nice, and finally some tutorials, traditionally these consist of "Hello World" and "the 10 minute blog," showing you how to put an application together. Video tutorials are just icing on the cake. And the best of all worlds, is when that framework has a published book, showing that someone cared enough about the framework to write a book about their passion with the framework.

Next is a combination of good code and documentation. I want the framework to be easy to install with clear cut installation instructions on multiple platforms. The code should come up and run, or if configuration is needed for the system, the documentation should walk us very slowly through the process. An installation screen that checks system requirements with a unit test gives me assurance that I can run the framework and all I need to work at now is configuration. Once configured the framework ought to show an introductory code example to the front of the screen as a jumping off point and introduction to the framework.

An active forum is the next thing I check. How many people are developing with the framework? When was the last posting in the forum? Hopefully, it was within the current month. I got excited about one of the frameworks I hadn't looked at before and when I checked the forum, the last posting was two years ago, needless to say I didn't investigate much further. What happens when you run into a technical problem in your development, you want somewhere to turn to ask a technical question. The larger the user community the more secure that I feel that the framework won't go the way of other dead frameworks of the past.

It would be nice to have a group of developers that work on the framework, more than one person developing means faster bug fixes, more versions, and better features and functionality.

I like to see a history of consistent versions, a version history, that shows a continual effort to improve the framework over time. And consistent in the sense of continuity, that the framework is not getting ripped up with a new architecture with each new version, which implies having to relearn the framework all over again.

Finally, I want quick software. I don't want a lot of bloat added to my code by the framework. I call this a lightness in the code and the way its used. Speed is a good measure of this. Is the framework quick.

And now to some PHP technicals. I want a framework that incorporates the latest technologies, and is up to date with what's going on currently in the software development world. With PHP, that means object oriented. The framework has to be PHP 5 based only. The trouble with those that do PHP4 and PHP5 is there are allowances made to incorporate the old technology which to me distracts from the use of the framework.

And I finished with some of the things I talked about in the introductory article. Good security, a good autoloader, an intuitive file architecture using the MVC model. I like to see an ORM, or Object Relational Model, that speeds database SQL integration with PHP objects.

The above list of criteria, cuts that list of 70 down to only a few frameworks, I'll give you some opinions on the current state of some of these frameworks in my next posting.

Comments are closed.