The easy usage of PHP is also its bane because PHP has less restrictions than other languages, so it’s much easier to produce bad code.
A PHP Framework brings a solid architecture for coding with as well as some general-purpose functionalities focused mainly to reduce development efforts.
A PHP framework usually follows the MVC pattern, which may be a key feature to achieve a well structured code to serve pages.
Take into account that, out of the box, PHP does not offer this pattern to structure the code.
It’s also very common to see a PHP framework offering an easy way to define how the urls will be and where the request will be redirec to.
This is a significant change compared to traditional PHP applications where scripts were being requested directly via the url.
Nowadays AJAX is a key ingredient to success a web application, because of the usability. A good PHP framework should has the capability to ease the AJAX development as much as possible.
Our framework offers several ways to handle AJAX, via components, annotations, custom events…
A PHP framework often integrates a security layer to ease authentication and authoriation tasks.
An example is the classic login/logout application. Take into account that this kind of applications are really easy to develop but extremally hard to maintain in PHP without a good and fine-grain security layer.
Convention over Configuration
One of the most notable benefits by using a framework: They save the time to configure everything, because they are already configured out of the box decreasing the number of decisions.
However, a good PHP framework should be also opened to allow the maximum flexibility in that sense allowing to customize its configuration.
Last but not least, because a good PHP framework has those and more funcionalities, it needs to also have good cache mechanisms to preprocess all hight-cost operations in order to avoid to penalty the performance in each request.
In fact, the framework layer must be as thin as possible.
To choose a good PHP framework is to bring a better quality to your code. The more quality your PHP code has the more efficient and scalable your application is.
To choose Lion as your PHP framework is an excelent option because it has all of those ingredients perfectly covered by following the best practices taken from the community as well as the most notable patterns, all of them adapted to PHP in the most elegant way.