A comparison of PHP frameworks
I have been developing PHP applications for over 8 years and it used to be easier. All you needed to do is create the PHP, connect the MySQL database and your application was completed after a little testing.
Then, the MVC concept was released and the main benefit was that it was supposed to streamline web development of PHP and sometimes JAVA in way where the web design was separated from the actual programming. Web designers work on the views and programmers work on the controllers and models. Sometimes I wonder if the views are still beneficial to web designers as they still need to know a little about PHP in order to display those variables.
I started learning about MVC with Zend Framework and I admit that was a mistake. If you want to learn MVC, Zend Framework is not the way to do it. It is too difficult for experienced programmers. I bang my head against the wall with Zend, not only because of its programming structure, but also because of its difficult server configuration. I needed a MVC framework that worked out of the box with little configuration like a database connection.
I tried Cake PHP, but it failed to install on my server and the error messages that were popping up were not documented in their online documentation. Therefore, I never settled with Cake PHP. I got further with Zend Framework.
Ok, I finally had success with Code Igniter. That worked with very little setup time and I started using MVC. It also helped me to understand the MVC concept much better, because I forced myself to use MVC. CodeIgniter has the BEST documentation out of anyone's framework documentation.
I did try Symphony and also liked it and developed a few web sites with it for my clients.
I also like Symphony, because it has a nice selection of library collections and much more than Code Igniter. Symphony also supports Amazon's cloud computing (Amazon S3) and ORM (Object Relational Mapping), and unfortunately that functionality is not available on Code Igniter.
So what is the best:
Still Code Igniter is the best and some web developers who use it complain that its libraries and helper functions are limited, but I like the fact that it is limited, because Code Igniter is the best regarding self-built libraries that I can customize to any situations.
Code Igniter also has a huge plugin library and has great documentation on how to create your own plugins, libraries, components, and helper functions, plus its extensible configuration system is easy to use, which on the opposite, I found utterly difficult with Zend Framework.
CodeIgniter comes with all of these great library utilities:
- Unit Testing
- Zip File Encoding
- Shopping cart functionality
- Built in calendar support
- Template parsing (smarty, etc)
- Pagination controls
- multiple testing environments
- Built-in FTP support
- Much more
And I love its built in security for SQL Injection protection, XSS (cross site scripting), and CSRF (Cross site request forgery) - What's also like about Code Igniter is its built in security class that allows you to protect against future security and hacking protection that has not been released yet.
I would love to hear your comments and suggestions