If you are looking to develop a web application using PHP, then it makes sense to consider using an established PHP framework. Why? Well, why re-invent the wheel? Frameworks come pre-built with basic tasks ready to be called. There is no need to write the code. Simply learn the API and tap into an existing code base to speed up your development. But what framework should you use. The obvious answer is: the one you are familiar with.
If, however, you are like me and haven’t worked with a PHP framework before, then the answer comes down to: whatever framework is easier to learn and quicker to develop with. Below are some notes I came up with while trialling a couple of the well-known PHP frameworks available.
- A large and complex framework. Your web server must be able to handle it, i.e. be configured to run it with its libraries.
- Pros: Loads of functionality.
- Cons: Not suitable for smaller projects as the size of the framework can “bloat” the smallest of projects.
- A popular framework with a very small foot print.
- Pros: Huge support and community base.
- Cons: Need to code a lot from scratch. There are no scaffolding tools for rapid code generation – like Gii in Yii.
- A relatively new-comer to the PHP framework scene, with lots of power, potential and growing community base.
- Pros: The scaffolding tool (Gii) is brilliant for quick code generation. It has a very small footprint and there are no special server requirements – it’s just PHP.
- Cons: Being fairly new there isn’t as big a community base behind it compared with something more established, like CodeIgnitor. But it’s growing.