My personal take on PHP Frameworks
Well, there has been lots and lots of talk about PHP Frameworks over the past couple of years and it almost looks like everyday a new one comes out that promises faster and easier PHP development.
I’ve personally tried a few different ones, specifically CakePHP, Code Igniter and, to a lesser extent, the Zend Framework. They all do what they are supposed to, of course, but at some point I almost always seem to find myself loosing a lot of time figuring out the best or recommended way to do something and I end up thinking something like: “well, if I was using just pure PHP, I could just do it like so”. But most frameworks of course exist for the purpose of maintaining a recommended way of doing things, the so called best practices according to the specific framework. Now, that is definitely not a bad thing, but even before the “PHP Framework Boom”, I was already using some kind of method for most of my development, some classes for database or file access, a simple templating system, a sort of simple MVC system using file includes, etc, etc.
And in the search for a better way to do my development, and after reading a lot of documentation for each, looking and posting on forums and newsgroups for a solution or a way to do this or that on framework X, I now am back to the basics of straight PHP and doing things “my own way”.
Now, this is my personal preference for the time being of course, and I’m definitely not saying frameworks are bad. Especially if you’re working on a big, complex or team project, coding guidelines, the modularity and security they provide will of course make your life and those of the other team members much easier. But for relatively simple webapps, much of the time I feel that frameworks are just kind of like using a cannon to kill a fly. Unless you’re already really familiar with one of them, taking the time to learn it when you already know how to code straight PHP is just a waste of time.
