EllisLab Inc., the same group that has created ExpressionEngine, is at it again by providing people with a free and open source PHP framework called CodeIgniter. This open source PHP framework allows users to create PHP-based applications without many of the complaints I already have with PHP. The best part is that you don’t really have to sacrifice anything to utilize this framework, and it has an amazing community behind it.
For the longest time, one of my main complaints with PHP has been that it isn’t as user friendly as, say, HTML is, for example. Well, that still remains true, but, for now, we have CodeIgniter. What is CodeIgniter? Well, let’s just say that it allows you to avoid quite a few of the complexities with PHP coding, and, instead, allows users to rapidly program applications. Even more importantly, it doesn’t sacrifice speed or functionality to accomplish this.
Simplicity is at the forefront of CodeIgniter’s design. It is really easy and, dare I say, fun to use. I actually feel like I’m using a language that makes a lot more sense than I would have if I was to take on a project with PHP alone. The documentation is fantastic, and while I wish there were more video tutorials available on the CodeIgniter site, they’re enough to show users what is possible with the CodeIgniter framework. I must say, though, the documentation for CodeIgniter has been very helpful.
One of the most difficult parts of PHP programming was the that connecting PHP with MySQL was a pain in the behind. Many times I began projects that utilized a MySQL database, and I usually gave up once I got to the point of tying those two together. This is no longer a problem. There are easy to use functions that allow data to be stored, retrieved, and removed from a database. It still isn’t as easy as I would like it to be, but it is a huge improvement.
One of the other reasons that I like CodeIgniter so much is that it is fast. I certainly haven’t personally put it through its paces, yet, but I am impressed with what I have seen so far.
Finally, I have nothing but good things to say for CodeIgniter’s community. The forums are a great place to ask questions, and there are plenty of people who have posted great tutorials on their sites.
There has been plenty of praise going around for CodeIgniter, and I will yet another to add to that praise.
CodeIgniter, as much as I like using it, is not perfect. I’ve read plenty of reviews, and most have great things to say about CodeIgniter, but there are some people who notice that some advanced functionality is left out:
What is wrong with Code Igniter you may ask? Well it seems like it is fast because it strips out so much stuff for you. By default there is no support for a layout template in which your views are embedded (although a quick Google brings us to this), and models must be manually loaded. They don’t connect to the DB automatically, so you must also do this. Therefore, you must also close the DB connection.
In CodeIgniter’s defense, I haven’t found any inaccessible functionality, but, then again, I am not doing any crazy advanced stuff quite yet. Also, if you are a PHP coding ninja, you probably would opt to use PHP in its entirety.
[Update: Several people have pointed out that CodeIgniter does not have the aforementioned problem (anymore). I haven’t experienced any of those issues. Other people can talk about that in more detail. This is just a heads-up.]
I believe that CodeIgniter still has some growing to do, but I also think there is a lot of potential with a framework like this. There are alternatives like CakePHP and Symfony. (Several bloggers have posted great comparisons of each framework.) I will admit that I have not tried those yet (I based my decision to use CodeIgniter from the start by reviews of others), but I am pleased with what I have seen so far, and I am using it to explore PHP further and, potentially, create a custom CMS solution for a site I am working on in my spare time.
Oh, and did I mention that ExpressionEngine 2 is being rebuilt with CodeIgniter? When a company utilizes their own technologies to create products for consumers—all while allowing users to explore and utilize it—this really speaks volumes. It is all pretty cool.
If I happen to try out the other frameworks, I will post my thoughts, but, for now, CodeIgniter works well for all that I want to accomplish.
If you’ve tried CodeIgniter, Symfony, CakePHP, or any other PHP framework, let us know how your experience went.