CodeIgniter: A PHP Framework That Doesn’t Suck

July 4th, 2007

I stumbled across CodeIgniter for the first time today. It seems people have been using it for a while, but this is the first time I’ve been made aware of it. I had a chance to give it a run through the gauntlet on a recent project.
I have to say it’s actually pretty decent as far as PHP frameworks go. It’s unobtrusive without being half-assed. It’s powerful without feeling overwhelming. It just damn well works and doesn’t try to do more than it should.

This is high praise coming from me. Despite the six years of commercial PHP development behind me, I think PHP sucks. Further, I’ve rejected outright frameworks like CakePHP and Symfony, most of which feel like they were too busy wishing they were Rails and doing a little too much “magic”. Ruby makes the magic in Rails beautiful and manageable. In PHP, things feel far less elegant and the “Rails-esque” PHP frameworks often reflect that awkwardness. CodeIgniter avoids this pitfall by providing a solid foundation on which to build web applications and sites without getting the way.

It’s not all roses though. Like any other framework, CodeIgniter has its warts: The validation and pagination libraries are a little awkward to configure, the “Model” portion of the MVC framework feels relatively weak, it wouldn’t hurt to merge some libraries/helpers and add others with more utility. Inevitably you still suffer from PHP’s shortcomings: a flat namespace, shit OOP support (for PHP4, anyway) and the unpredictable naming conventions of the standard library. Not that this is CodeIgniter’s fault, just another failing of the PHP as a development language and platform.

On the whole, however, CodeIgniter gives a big bang for its buck and, given a few years, could prove to be a formidable framework indeed should Zend come up short. I highly recommend giving it a careful look and evaluating it for your next web project.

Categories: PHP |

Leave a comment