While working on a PHP application, you are not forced to adopt a framework. However, many of us choose to borrow an architecture and technical expertise from a popular framework, instead of reiventing many of the components we need.
However, one of the difficult parts of framework adoption, especially in the PHP world, is about choosing the right framework. There is a proliferation of open source solutions and a team must analyze the overall picture thoroughly before locking itself into a particular framework. Changing the framework which an application is built with without shaking its foundations would be probably impossible after a certain period of development.
What do you look for when choosing a framework? Here are my example parameters.
- Functionalities: MVC architecture, database access support, authentication, authorization, caching, logging... Sometimes frameworks compete on features, although the picture is moving towards more interoperability, for example with Symfony adopting some components of Zend Framework.
- Performance: introducing a layer between the HTTP request and your code is of course going to slow down the application, trading it off for convenience. But frameworks try to fight this issue and avoiding a bloated framework can be a part of the choice.
- Community, support and life expectancy. Since an application is locked-in with its particular framework, we have better make sure that the framework will live long and prosper. A selling point of the major PHP framework is a company behind it whose best interest is continuing the framework (such as Zend and Sensio).
- Licensing: this can be an issue for client-side frameworks like Ext JS, but most of the PHP frameworks worth talking about come with an MIT or BSD license, which are the most liberal open source license. You can integrate the framework in your proprietary application without any issues, and frameworks like Zend protecte you also from possible Intellectual Property issues by forcing a license agreement on each contribution.
I framed this question differently because I do not want to talk about legacy applications, or lock-ins you are already experiencing. Consider a green field and not your current applications.
I omitted also version numbers to avoid fragmentation: it's up to you choosing a stable version or one of the pre-release innovative ones.