Zend Framework 2.0 Taking Shape

Posted by on March 11, 2010
 

There’s been lots of buzz about Zend Framework 2.0 recently, and for good reason: the feature list is truly kick-ass. With dozens of proposed changes, the second iteration of the web’s most popular framework is looking to be considerably better, more efficient and easier to use than the first, while still offering the functionality that framework users have come to expect.

Some of the most noticeable changes are planned for the way objects are handled. First and foremost, Zend Framework’s authors have decided to eliminate many if not most of the singletons throughout the framework. This change will considerably improve unit testing as well as improve the overall design. Second, the framework will employ “design by contract” – using interfaces to develop APIs for various components. The design by contract paradigm helps improve API consistency, and the framework’s consistency will be overall improved.

Zend’s team will also unify the constructor for each class, making the first argument take an instance of Zend_Config. This will allow configuration options to be passed nearly universally, as well as allow for easier dependency injection and the introduction of “named” arguments.

Another significant change will be that Zend Framework 2.0 will require PHP 5.3. This is because it will make use of namespaces, as well as (very) sparing use of goto for certain applications. Furthermore, it will autoload all components, which improves performance and eliminates dependency problems (especially for exceptions). The framework will also make use of the __invoke() magic method and closures.

One consistent complaint being addressed is the request time for Zend Framework requests. Other frameworks, especially micro frameworks, greatly exceed Zend Framework’s ability to handle requests; some refactoring in 2.0 will help reduce and improve the request time and performance of the framework’s MVC components. These improvements are necessary, as Zend Framework can bog down under heavy load.

The improvements offered are not yet set in stone; they may change as Zend refines and further identifies the areas where the framework needs improvement. But the current list is fairly extensive, and when implemented, will represent a great step forward for this already awesome framework.


About the author—Marco is the keeper of keys and Chief Garbage Collector at Blue Parabola. He can be found on Twitter as @mtabini.