10 Reasons Why CodeIgniter Rocks
Every once and a while you come across a blog post or forum discussion about what PHP application framework is the best. They each have their own positives and negatives, but the true answer to that question is that it depends on the programmer. Each programmer has a different style and different priorities when it comes to adopting a tool kit to use when building apps.
My framework of choice is CodeIgniter (CI) and below are my 10 reasons why CI rocks:
| 10. | MVC Architecture
The model, view, controller architecture is nothing new. It seems like all the coding frameworks are MVC nowadays, and if they aren’t it can be configured easily. I have had experience building large apps the procedural way and every time they end up with unmanageable spaghetti code. The MVC way of doing things offers nice code separation and keeps things clean. Some frameworks force you to do things by the books but CI lets you use MVC in a way that makes sense you. If that means ignoring models all together then so be it. |
| 9. | Little to no server requirements.
Unlike other PHP frameworks, CI works with both PHP 4 and 5. That makes the lives of someone like me who has to be able to work seamlessly between the two environments much easier. Of course I have painted myself into a corner from time and used PHP5 techniques in my apps, but the framework itself works on either. |
| 8. | Easy to understand and extend.
CI is the first framework that I used that actually makes sense to me. I have tried Cake PHP, the Zend framework, Symfony and many others and I was able to get up and running with CI the quickest. CI is also easy to write new libraries, change the behaviour of existing libraries and just change the overall behaviour of the framework with little effort. |
| 7. | All the tools you need in one little package.
Calendar, e-mail, zip encoding, validation, uploading, sessions, unit testing… that is just a few of the built in libraries that come with CI. It also includes a boat load of default helpers for things like forms, file handling, arrays, strings, cookies, directories and more. Plus, if that wasn’t enough, you can create your own libraries and helpers or use code that has been developed by the CI community and posted to the wiki. |
| 6. | No “installation” necessary.
Believe it or not, one of the hardest things I have experienced with trying new frameworks is installing them. I am not a fan of UNIX command line so I tend to look for tools that I can install and use by just uploading files to a directory. CI fits this requirement nicely. No need for PEAR packages or server modifications to get the framework up and running. Just upload the files to your server and your off. |
| 5. | Built in security tools.
CI allows you to implement as much or as little security as you feel is necessary for your app. It does some things by default like unsetting all global variables regardless of PHPs register_globals directive and turning off the magic_quotes_runtime directive during system initialization so that you don’t have to remove slashes when retrieving data from your database. Other things can be enabled like cookie encryption, handling session data with a database and automatically escaping SQL queries. |
| 4. | Database abstraction and more.
Every decent framework has a database abstraction layer nowadays and CI is no exception. You can easily create insert, update and delete statements without needing to write raw SQL. Handle connections to multiple databases within one application and connect to any of the following database types: MySQL (4.1+), MySQLi, MS SQL, Postgre, Oracle, SQLite, or ODBC. CI also lets you manipulate your database like add/remove columns from tables, create new tables and remove old ones using it’s new database forge library. |
| 3. | Large and active user community.
The last time I checked, there were over 57,000 registered members on the CI forums. That is a nice and big user community to work with when you have a problem or question. The CI website has a forum and wiki when your looking for answers. No confusing group mailing lists or chat channels just to get a quick answer to a question. |
| 2. | Excellent documentation.
By far, the biggest advantage of CI over any other framework is it’s documentation. I will admit to trying some other frameworks while they were still in BETA and under development. But, CIs documentation is 10 times better than other framework documentation I have come across and I strongly think thats because CI is backed by a company and not just a community. EllisLab, the company behind CI, takes a lot of pride in CI and they have big plans for it and thats why they don’t have a problem in spending the time that is necessary to come up with quality documentation for the user community. |
| 1. | Will soon be one in the same with ExpressionEngine.
The #1 reason why CI rocks is that ExpressiongEngine, EllisLabs content management system, is currently being rebuilt to use the framework. This means that whatever libraries, helpers, etc. that you develop for CI you can use with EE in the future and vice versa. This also means that whatever EE needs to operate, CI gets. This could means things like an improved parser class, built in user authentication, ability to easily program modular applications and more. All of this is just speculation as the new version of EE is not out yet, but a man can dream. |
Related posts:
- Building Applications using CodeIgniter (Part 2) – Configuration
- 10 Reasons Why Campaign Monitor Rocks
- 10 Reasons Why Media Temple Rocks
- Building Applications using CodeIgniter (Part 3) – Helpers
- Building Applications using CodeIgniter (Part 1) – File Structure
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

I have to say, I really appreciate the way you framed this post. IMO, all the this framework vs. that framework blog posts are kinda missing the point of having multiple frameworks in the first place. I’m also happy that ZF shares at least some of the attributes you like about CI.
On point 8, you should check out the new Zend_Tool component that we’ll be releasing in the laboratory soon.
My #1 reason why Code Igniter rocks? You can use it so easily in combination with ZF!
I too love CodeIgniter. I tried really hard to like the Zend Framework as it’s supposed to be extremely simple and is viewed as the “official” php framework. Despite my best efforts, I found ZF to be extremely difficult to set up. In particular, I remember routing to be a pain. I was able to get everything done that I needed to get done, but it was far more trouble that I was hoping it would be. So I started looking at CodeIgniter. Since then, I’ve rewritten my main web applications that I maintain using CodeIgniter. I haven’t yet looked into Expression Engine in detail but if CI and EE merge then that would be really nice.
I have also done a lot of Ruby on Rails development. I set up my RoR server before Phusion Passenger (mod_rails) was released so I’ve got mongrel clusters running all over the place. So point #6 is extremely nice as CI doesn’t require any crazy installation. Thanks for the post it was great!
Hey Lee, thanks for the comment!
Yeah, I tried hard to like the Zend framework as well for the same reason but I could never get it installed properly. I just can’t put my support behind a programming framework that has a lot of server requirements and such because then your program is no longer easily portable.
I’ve lost count of the number of apps I’ve had to move from one server/hosting environment to another and have run into so many issues because the server didn’t have what was needed to run the app (like PEAR extensions). I don’t have those problems with CI; as long as it’s running at least PHP 4 or 5 I’m usually good.
Numbers 8 and 2 sold it to me. I’ve played about with quite a few frameworks, but I fell in love with CI the first time I started using it. It is so, so simple, and the documentation so clear, that I reckon almost anyone with basic PHP + database experience would be able to get to grips with it. It just plain makes sense.
Good coverage and same feelings on many points. I am looking for a tool to help me construct my web apps as fast as I can think of them. I started years ago as a hobby with hand coding every character then tried Joomla and had hosting issues then wordpress and it is not as easy to create a CMS as I wanted …then I skipped around various PHP Frameworks hoping ZF would be the default quick and easy and powerful answer only to find that it is indeed CodeIgniter that Rocks in the easy and powerful department.
I am still learning but I have been able to solve a couple early issues and have great hope for the future ….
Good article. I just started learning CI. And believe me I love its style. Its really easy to do things with this for me. I have ZF. But it sucks while installation. And more than this article encouraged me to learn. Good to know that am on right track. thanks. and sorry for my bad English…
It is hard not to enjoy anything that compliments
Code Igniter! Yes, hands down the best framework I’ve ever used. Nice and simple, use only what you need type of environment.
It was a great way to learn MVC and PHP all in one shot!
I have just started to use it and was up and running within minutes.
What a contrast from the Zend Framework. ZF was a pain to install and was so difficult to understand. Even the tutorials on the official site didn’t even work leading me to endless frustration.
CI has cured all this. 10/10
I’ve spent about an hour trying to get Zend Framework installed on my Mac with MAMP. I’m a developer and have all kinds of apps running along with MAMP for all my testing. Installing Zend Framework is horrid. You have to modify the php.ini include_path then use a command line utility to setup a project…. then setup a bootstrap file and an index file.. and so on. I finally ditched it all together. This is suppose to be rapid development. spending this long installing the framework made me decide against it completely.
I remember previously I installed CI (CodeIgnitor) in about 5 minutes and was up and running…. time to go back to put some time into learning the syntax of CI.
ZF seems like a waste and doesn’t make you want to learn it if they can’t make the setup/install process more simplfied compared to many other popular competing frameworks
Ohh I forgot to add the worst part yet… ZF doesn’t even give you the proper files to setup projects?! 1.9… lol
/zf.sh create project quickstart
Warning: require_once(Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php): failed to open stream: No such file or directory in /Users/scottamort/Projects/zf-1.9/library/Zend/Tool/Framework/Loader/IncludePathLoader.php on line 31
Fatal error: require_once(): Failed opening required ‘Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php’ (include_path=’/Users/scottamort/Projects/zf-1.9/library:.:’) in /Users/scottamort/Projects/zf-1.9/library/Zend/Tool/Framework/Loader/IncludePathLoader.php on line 31
U52:bin scottamort$ ls ../library/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php
ls: ../library/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php: No such file or directory
U52:bin scottamort$ pwd
/Users/scottamort/Projects/zf-1.9/bin
U52:bin scottamort$ cd ..
U52:zf-1.9 scottamort$ cd library/
U52:library scottamort$ ls Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php
ls: Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php: No such file or directory
lol
Steve, I hear ya! Every once and a while I convince myself to take another look at ZF just because it’s supposed to be the enterprise framework for PHP and such. But it doesn’t take me long before I’m arguing with myself because I can accomplish the same things in CI much faster and simpler. Perhaps I’ve just never had a project big or complex enough to warrant ZF, I don’t know. I guess I will revisit again if I ever outgrow CodeIgniter (which I don’t believe will be anytime soon).
Nice list.
There is also a German-Speaking community at http://codeigniter.ch
CodeIgniting is fun
I am having second thoughts on codeigniter.The simplicity of it attracted me but its getting way too simple.Apart from datamapper and a couple of other contributions,codeigniter community lags behind cakephp and symphony maybe by a century.