If you're a PHP ninja, and not a die-hard Rubyist, you may be wondering what options are out there and which framework is right for you. The answer depends on a number of factors, and today we'll review the questions you should be asking when choosing a PHP framework for your next application.
We'll also take a look at popular PHP frameworks and what sets them apart. That way, you can make an informed decision on which framework best suits your project -- or if you should even use a framework at all.
Determining Your Needs
Before you can decide on a framework for your project you should first understand its needs, its requirements, and a little about the development team working behind the scenes. There are three main questions to ask yourself before going forward:
What's the primary focus of your application? Will it be an ecommerce business, a social community, a messaging platform or a directory? If you're building an ecommerce site, for instance, you may want to choose a framework with some baked-in libraries with proven extensions for dealing with credit card processing. On the other hand, a lightweight messaging platform may need to scale very rapidly or use multiple servers and databases for load balancing and faster connectivity.
What will your hosting environment be? Some frameworks require additional PHP modules or software installation on the server, which may not be an option in shared hosting environments. Furthermore, a lightweight framework on which everything is self-contained and highly portable may not provide the best functionality for serious data manipulation or large information processing. For example, some frameworks work best with MySQL, while others include libraries for working with key-value and document store databases, for example.
What are the strengths and weaknesses of the developer(s)? It's important to get a sense of the skills and shortcomings of the developer(s) who will actually be building and maintaining the application. Some frameworks are more user-friendly and better for beginners. While the answer to this question probably shouldn't be a deciding factor (learning new things is good), it is definitely one to take into account given your timeline, budget and security considerations.
The Frameworks
Now that we've looked at some of the basic requirements of your application and the dev team behind it, let's examine some popular PHP frameworks and see what each one has to offer.
[nggallery id=1611]