CodeIgniter: My first look

May 12th, 2008 by jason

codeigniter.jpg

I have been looking at learning how to use a PHP framework for some time now. There are many of them, which can be found here: http://phpframeworks.com . I have chosen CodeIgniter as my first framework to learn as it was recommended by peers and its features seemed to be exactly what I have been looking for.

A quick look at some of the features CodeIgniter has to offer:

Like Ruby on Rails, CodeIgniter allows the user to interface with the database using active records and encourages use of the model-view-controller architectural pattern.

  • PHP 4 Compatible
  • Extremely Light Weight
  • Support for Multiple Database Platforms
  • Form and Data Validation
  • Security and XSS Filtering
  • Session Management
  • Email Sending Class. Supports Attachments, HTML/Text email, multiple protocols (sendmail, SMTP, and Mail) and more.
  • Image Manipulation Library (cropping, resizing, rotating, etc.). Supports GD, ImageMagick, and NetPBM
  • File Uploading Class
  • FTP Class
  • Localization
  • Pagination
  • Data Encryption
  • Benchmarking
  • Full Page Caching
  • Error Logging
  • Application Profiling
  • Scaffolding
  • Calendaring Class
  • User Agent Class
  • Zip Encoding Class
  • Template Engine Class
  • Trackback Class
  • XML-RPC Library
  • Unit Testing Class
  • Search-engine Friendly URLs
  • Flexible URI Routing
  • Support for Hooks, Class Extensions, and Plugins
  • Large library of “helper” functions

When extracted CodeIgniter takes up just over 2MB of disk space which to me seems quite hefty. However, after doing some research it seems that most other frameworks are a lot bigger. CodeIgniter promises to reduce development time and aid developers to conform to a common standard.

Having a look inside the extracted folder, developers will do most of their coding inside system->application. Inside the application folder there are the view and controller folders where you will most likely spend most of your time coding. The controller folder is where you will program your functions and classes. The view folder is where you will code the actual design and call in data processed in the controller folder. There are also a few other folders that mainly serve the purpose of configuration of your web application.

After my first use of CodeIgniter I was fairly impressed. I was able to make a moderately complex application in not a lot of time. I liked how everything was separated in a nice and easy to find way. I made use of a few of the provided libraries and was impressed at how easily they worked.

I did run into a few issues however, but I won’t highlight them in this article as I’m sure its just because I am still not that experienced with some of CodeIgniter’s workings.

Thanks for reading this article and keep a look out for more about CodeIgniter in the near future.

 

del.icio.us Digg Technorati StumbleUpon

Posted in Frameworks, PHP Code

7 Comments

  1. Derek Allard

    I always enjoy reading these types of posts… CodeIgniter will change the way you look at coding. You mention that you ran into a few pitfalls - I’d encourage you to post on the CI forums, where the community is super helpful, and super knowledgeable, and always welcoming of new users.

  2. Stii

    … or you could hook up with me and ask. I’m probably Code Igniter’s biggest fan in SA. I’ve been developing in it for quite some time, so if you need any help at all, feel free to drop by and ask. I’m always glad to help.

    BTW, dunno if you are aware, but Afrigator is built and proudly powered by Code Igniter and Vincent Maher from the Mail & Gaurdian told me that their new news potal will also be CI powered! Code Igniter FTW!

  3. jason

    @Derek thanks, I will definitely go check up on the forum.

    @Stii thanks man, I will take you up on that one!

  4. Matthew Vorster

    Had a quick look at it the other day and I must say that I was very impressed with its use of classes (not confusing) as well as how it handles URLs. I am definitely going to be trying it out soon :) Nice post Jason :)

  5. Jason Dugmore

    @Matthew thanks man! We must give each other pointers!

  6. Hugh Jacobs

    Stylin’ article man. ;)

  7. Bala

    I have used other PHP frameworks before on various projects. My latest project is http://www.uduko.com and I have used Code Igniter as the base. The framework provides a ton of functionality although I would have liked better ajax integration. I used my own ajax helpers to make ajax calls to simplify ajax presentation. On the whole the framework save me a lot of work and I would recommend it to anyone from hobby programmers to serious site builders.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.