ellislab / CodeIgniter (http://codeigniter.com/)

CodeIgniter, the open source PHP web application framework from EllisLab, Inc.

Clone this repository (size: 6.9 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/ellislab/codeigniter

What's New in CodeIgniter 2.0

An overview of changes that developers can expect in the 2.0.0 release of the CodeIgniter Framework

See also:

So Long, Farewell

As of CodeIgniter 2.0.0, Scaffolding has been completely removed. Additionally, plugins have been removed (gone with it is the javascript calendar plugin). Developers are encouraged to refactor existing plugins as helpers or libraries.

To PHP 5 and Beyond

"PHP 4 support is deprecated. Features new to 2.0.0 may not support PHP 4, and all legacy features will no longer support PHP 4 as of 2.1.0."

EllisLab has decided not to bend backward to the needs of PHP 4 environments in its development of the framework. Although CodeIgniter developers have always been able to code in PHP 5 environments, CodeIgniter could not take advantages of the modern version without providing workarounds for PHP 4.

As a result, developers may expect to see quicker development of new features, and to see better features afforded by PHP 5's APIs, structure and conventions.

Drivers

Drivers are a new special type of Library that has a parent class and any number of potential child classes. Child classes have access to the parent class, but not their siblings.

Drivers aim to provide an elegant syntax in your controllers for libraries that benefit from or require being broken down into discrete classes.

An example of drivers in previous releases of CodeIgniter is the Database Abstraction class. There is one core class for handling database functions and multiple drivers to handle functions specific to different DBMSs. CodeIgniter 2.0.0 introduces another example, the Javascript class and its child Jquery driver

Application Packages

A new feature of the Loader class is Application Packages. An application package allows for the easy distribution of complete sets of resources in a single directory, complete with its own libraries, models, helpers, config, and language files.

CodeIgniter documentation suggests that developers place application packages in a new application/third_party folder, but the Loader class API allows developers to supply any location on the server. Different application packages could theoretically live at different server locations.

This new structure is purposefully loosely defined. Although the most obvious use of application packages might be to develop modular structures for applications, developers are allowed to interpret and use application packages in their own unique way.

Application packages, combined with updates to URI routing, also seem to promote the use of skinnier controllers, whose roles might be to sanitize input, route requests, fire-off related application packages, and then use views to construct the interface. In this regard, application packages appear to essentially be a more robust, better structured Model layer for CodeIgniter. It will be up to developers and the community how packages are ultimately utilized.

Security Class

Security measures that are currently implemented by the Input class have been moved to the new Security class.

New to the class are functions for preventing CSRF attacks by setting unique cookie values that must be matched by a value in the $_POST array on subsequent requests.

Other Notable Changes

  • A new Profiler class will replace profiling functionality currently provided by the Output class. Individual profiler sections can now be enabled or disabled by the developer
  • Application routing and configuration can now be supplied in front controller files (index.php). This means applications can be accessed through different front controllers in order to invoke different settings, giving one application more mileage (think multi-site managers, etc).

This revision is from 2010-06-18 01:40