Why you should use Codeigniter
I love using Codeigniter. I have to admit that it’s the first framework that I came in contact with and although I have used other frameworks, I always return to Codeigniter. For anyone out there who doesn’t know what Codeigniter is and why it’s so awesome, I am going to try and summarize it in 5 key points:
- Codeigniter is a MVC framework for PHP.
MVC (which stands for Model–view–controller) is a software architecture pattern which separates the representation of information from the user’s interaction with it (wikipedia). By using Codeigniter, which implements the MVC pattern, you are making sure that your code stays clean, concise, is reusable and maintains an easy follow structure in all your projects. Moreover your code will be easier to follow for other developers, provided they know what MVC is.
- It comes with all sorts of goodies out of the box.
Codeigniter comes built in with a number of useful libraries that cover most everyday jobs. E-mail, uploading, cookies, zip encoding, validation, unit testing… the list goes on. It also includes a lot of small functions, called helpers, for things like forms, file handling, arrays, strings etc. Not having to rely on 3rd party classes for everyday jobs is a definite plus. Also all packages follow the same file structure and are easily customized but more importantly all packages are easily extended through standard PHP classes.
- Codeigniter is secure.
Codeigniter has a lot of optional options for security, such as cookie encryption, handling session data from the database and automatically escaping SQL queries, allowing you to implement as much or as little security as you want. By default it does a lot of things 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.
Every framework should have a database abstraction layer and Codeigniter is no exception. You can create insert, update and delete statements without needing to write raw SQL. The coolest thing about using the database abstraction layer provided in Codeigniter, is that you can change the database provider by simply changing a line in your config file. Codeigniter currently supports MySQL (4.1+), MySQLi, MS SQL, Postgre, Oracle, SQLite, or ODBC.
- Excellent documentation and active user community.
Codeigniter has one of the largest and most active user communities. The CI website has a forum and a wiki that most of the time will have the answer that you are looking for. If not, you can always post a question in the forums and one of its numerous members will answer you. However by far, the greatest advantage of Codeigniter over other frameworks, is it’s documentation. For every library and every helper there is a detailed explanation on its purpose and its various options in the Codeigniter documentation which can be found here (http://ellislab.com/codeigniter/user-guide/).
You can download the latest version of Codeigniter (currently 2.1.4) here http://ellislab.com/codeigniter