Fabulous PHP frameworks: CodeIgniter

CodeIgniter combines an easy installation with simplicity and flexibility, but is limited in features compared to competitors

CodeIgniter, a PHP MVC (model view controller) framework sponsored by Ellis Labs, touts itself as a solution for those developers who eschew large, over-abundant frameworks. CodeIgniter's installation requires little effort; you unzip the download package to your Web application's home directory and modify a pair of files -- one a general configuration file, the other governing database specifications. CodeIgniter needs only PHP version 4.3.2 or later. (The CodeIgniter engineers decided not to require PHP 5, because they did not want to alienate current users already employing PHP 4.) Perhaps CodeIgniter's only downside is its lack of JavaScript support, although this is expected in a future release.

Like the Zend Framework, CodeIgniter uses the front-end controller pattern. All HTTP requests are received by index.php, sent to the proper processing routines through a routing system, passed through a security system (which shields the application's controllers from malicious input), then finally handed to a controller. The controller loads the model, processes the request, and sends the result to the view system.

CodeIgniter helpers, libraries, extensions
Though it has a small footprint, CodeIgniter is extensible through a variety of mechanisms: helpers, libraries, class extensions, and hooks. A helper is a collection of functions that handle related tasks. CodeIgniter includes a sizable collection of helpers: for preloading input forms with data taken from arrays or objects, for JSON (JavaScript Object Notation) and the Mootools JavaScript library, for managing digital media, and more. By comparison, a library provides more extensive behavior than a helper. CodeIgniter has libraries for user login and authentication, session management, encryption, file uploading, and so on.

A class extension is -- as its name implies -- simply the PHP mechanism for extending the instance variables and methods of an existing class to provide specialized capabilities. Finally, CodeIgniter hooks let you alter the behavior of the framework itself, without having to hack into the code. You define a hook by specifying a hooking point. For example, the pre_system hooking point attaches the hook early in the process of system execution, while the post_system hooking point lets you inject behavior after the Web page has been rendered. You then associate class and method, as well as the file path to the class and method that you want invoked. When the application's execution hits the hooking point, CodeIgniter will dynamically load and execute your code.

Test Center Scorecard
  40% 25% 25% 10%  
CodeIgniter 1.7.3 8 9 8 9


Very Good

1 2 Page 1
Page 1 of 2
InfoWorld Technology of the Year Awards 2023. Now open for entries!