As any one who has worked with or for me , I’m a Ruby on Rails and CakePHP guy. I’ve used both for years and I’m very comfortable with them. I tried CodeIgniter briefly about 3 years ago and didn’t like it at all. At the time I felt that it wasn’t as polished or as complete as CakePHP as a frame work, and didn’t pursue it further. Before any one decides to flame me, read on
A recent professional development caused me to give CodeIgniter a second glance and I think I’m beginning to see what I missed the first time around. As I began to go through the documentation and play around with the code I realized that because I had already been very deeply involved in RoR and CakePHP their paradigms had colored my vision. Both have a very ridged, “My way or the High way” feel. People tend to phrase it something like, “convention over configuration”. I felt comfortable with that. It meant a lot of things I just plain and simple didn’t have to worry about!
CodeIgniter doesn’t do that. The first time I tried CodeIgniter I felt this was indicative of incompleteness or lack of power. Wow, what a mistake! It is true that CodeIgnitor does not FORCE you to do things in one particular way. It’s also true that it will allow you to do things just about any way you want. ANY WAY YOU WANT. That’s pretty cool. If you want to do strict mvc (like RoR or CakePHP) you can. Or you could drop the model entirely if you wanted. No sweat. As I really looked at what that meant it hit me suddenly. That’s freedom! That’s flexibility. And it comes at a very small cost in terms of aditional configuration (read nearly non existant.). Some things (like setting up a form to insert data) are a tad more complicated, but nothing to speak of. And you gain so much!
And when I say “so much” I’m looking beyond just flexibility and freedom. The way CodeIgniter handles loading things like helpers, models and views allows you to load as much or as little as you need very, very easily. Beyond the flexibility that opens up some serious performance gains, since it’s as easy to load as not to load, so you might as well leave it out till you need it!
One final point worth mentioning is documentation. While both RoR and Cake have made serious gains in documentation and both have a really strong community surrounding them, I can’t stand the official documentation. CodeIgniter has AMAZING docs that are both thorough and easy to read. It’s been a while since I experienced that!
Now, I’m just getting my feet wet, and I’m by no means saying I’m ditching my old friends RoR and Cake, but I have some revelatory experiences with CodeIgniter. You can bet I’ll be throwing it at a couple of projects in the near future.