Advertisement

Tutorials

Home News Cgiapp 2.0.0 Released

News by CGIDir


Cgiapp 2.0.0 Released

 

CGIDir
Monday, June 5, 2006; 02:47 AM

After many months in release candidate state, the first stable release of Cgiapp2 is now available.

Cgiapp is a PHP framework for creating reusable web applications. It is a port of the perl module CGI::Application, with a few minor additions. It uses Smarty as its default template engine. It has been tested with both PHP4 and PHP5. Cgiapp2 is a PHP5-only version of Cgiapp.

The 2.x series of Cgiapp completes a PHP5 port of Cgiapp2. PHP5 compatibility changes include visibility operators for all properties and methods, declaration of many methods as static and/or final, and the use of exceptions for catching run mode errors. Most notably, though, is the fact that Cgiapp2 is now an abstract class, with one abstract method, setup(); this enforces the fact that you must subclass Cgiapp2 in order to create your application.

New features include:

  • Callback hook system. Cgiapp2 is now an observer subject, and has hooks at several locations within the application. Additionally, it provides a method for registering new hooks in your applications. The callback hook system replaces the plugin system introduced in Cgiapp 1.7.0.
  • Template engines are now relegated to plugin classes, and should implement the Cgiapp2_Plugin_Template_Interface. Shipped template engines include Smarty, Savant2, Savant3, and XSLT.
  • Improved and more extensive error handling, which has been expanded to exceptions as well. Cgiapp2_Exception and Cgiapp2_Error are both observable subjects, with interface classes for implementing observers. This allows the developer to tie into exceptions and errors and perform actions when triggered (Log and Mail observers are implemented for each).
  • Cgiapp2_FrontController class. This is a simple front controller that dispatches to public static methods in registered classes. Included is a 'page' controller for handling static pages.

For more information and upgrade notes, visit http://cgiapp.sourceforge.net .

Advertisement

Partners

Related Resources

Other Resources

image arrow