Choosing a PHP Framework
I want to try a PHP framework for a job that is coming up. It’s an online booking system and needs to fit into an existing web site and have it’s own admin system. So which PHP Framework to try? A quick google gave me dozens of articles on the subject and it quickly became clear that the leaders, at this point in time, come down to: CakePHP, CodeIgnition, Symfony and ZendFramework. There were others that sounded interesting (WACT provide a pretty full listing here, Wikipedia here) but many seem to be in the dreaming phase or have gone to sleep some months back. Others of possible note include Fusebox (for fans of ColdFusion), Prado or Seagull.
While it's great that there is a wide range to choose from, I think that only a handfull will survive and I want to use one of the frameworks that will still be around in the years to come (or am I thinking too long term here???). So, I stuck with the four mentioned above.CodeIgniter: The ‘lightweight’ of the frameworks here, with an install size of about 1.5Mb. According to benchmarks on other sites, also the fastest (which figures, if it’s the lightest).
Lively forum with 64,000 registered members.
CakePHP: Installed size about 6Mb, but I’m not sure if some of that can’t be trimmed off in a live installation. CakePHP has a very nice website, lots of allusions to cake, breads and baking in general. Overall a fun feel and I found myself rooting for this framework to come out the best. Digging deeper into the docs, I found gaps and a general ‘thinness’ to the information. There is also a code generator in the /cake directory but no information on the site as to how to use it. And no forum? Although there is an unofficial one which is reasonably lively (800 members).
Symfony: is a very full featured framework, and one of the largest here. The documentation is excellent and the concepts well thought out. I went through the demo (create a simple blog) in about an hour and that gives a good feel for the development process. A large and lively forum of contributors and mailing lists.
Zend Framework: I haven’t got around to trying this one out yet. I have the (probably wrong) preconception that is some large, cumbersome enterprise oriented framework that I don’t want to get involved in… but when I have time I’ll take a look.
So how to choose… I like Symfony, and I’d definitely consider that for a large, multideveloper project. It has a code generator which is nice if you’ve got a lot of models and structures to generate (and regenerate). CakePHP also has a code generator, but I’m not sure how well that one works. I’ve recently switched over to using NetBeans for coding and it’s rumoured that regnerating code doesn’t play nice with NetBeans, so that also made me hesitate.
So, seeing as the project is not too large and I don’t want to generate code and i want something lightweight, I’m going to give CodeIgniter a try.
I’ll report back once things have got moving…
Technorati Tags: codeigniter, php framework