Framework of Choice: CodeIgniter

As a developer, I am always looking for ways to increase the quality of my work and the speed at which I complete a project. One of the ways I do this is by utilizing a framework. The framework I choose is CodeIgniter.

What is CodeIgniter?

CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.

CodeIgniter User Guide

There is a key word in the definition and that is toolkit. I see and read a lot about beginning PHP developers jumping right into using a framework, such as CodeIgniter. I believe if you want to learn PHP you gotta LEARN PHP! To fully understand the concept of Model-View-Controller (MVC) and the usage of CodeIgniter you should have an understanding of PHP and how it’s used, how to utilize it, etc. It’s also important you have a basic understanding of Object-Oriented concepts.

Why CodeIgniter?

I chose CodeIgniter as my framework of choice primarily because of the swift learning curve. Learning to utilize all of CodeIgniter’s libraries took very little time and practice. The documentation is straightforward, easy to understand and very descriptive in explaining the usage of each library. Each library in CodeIgniter does a good job of handling the task it has been given. For example, the Form Validation library handles everything that has to do with creating a web form, validating a web form and re-populating data back into the form. I have spent hours in the past creating web forms, validating on both client and server side, displaying errors if any and re-populating the form. The time it takes to create a form has been cut in half (if not more) by using CodeIgniter.

CodeIgniter has also helped me find bottlenecks in my code through the use of the Profiler Library. What the profiler does is show the developer (through the browser) how much memory the application is using, what is being loaded, any data that has been posted as well as any MySQL queries that have run and the time it took to execute the query.

These are just a couple of the libraries included with CodeIgniter that help you develop your application quickly. You are not limited to only these libraries either. CodeIgniter allows you to create your own libraries and load them just like any other library. You even have the ability to extend it’s own libraries or override them completely.

I am not writing this to say CodeIgniter is the best PHP framework out there. Every developer writes code in a unique way and/or uses a different set of tools and processes to complete a project. What I am saying is, if you are a Web Developer, you should have a set of tools you use. If not, take some time to create a library for yourself or try out the variety of frameworks out there. Whatever you decide, you need to master it and your process to become the best you can be.

Posted in: