Zend Framework 2.0 roadmap and comments
Week ago Matthew Weier O’Phinney published roadmap for Zend Framework 2.0 and invited community to discussion about planned changes. Since 2.0 will be first major version following first stable release (1.0), everyone expects backwards compatibility breaks in exchange for improved overall quality.
Most important things that will change, commented also by community (for instance by Giorgio Sironi), are:
- Minimum PHP version requirement – it will be PHP 5.3, but which particular one is not decided yet.
- Unified constructor – among many other profits it will allow Dependency Injection.
- Exceptions – base exceptions of components will be interfaces.
- Design by contract – during refactoring new interfaces will be created (or existing ones refactored) to reflect actual usage. The goal is to let developers create their own implementations of particular components or their parts instead of extending existing ones. Moreover, default implementations should be lightweight, covering common case functionalities only. It means, that functionality of some components will be reduced. It also means that framework will be faster and simpler to extend.
- Elimination of singletons – there are simply too many singletons in the framework. Most of them will be eliminated.
- Namespaces – underscore _ in class names will be dropped in favour of namespaces.
- Autoload-only – for coding simplification and solving some performance issues.
- MVC refactoring – it is impossible to summarize what will be changed since all related components will be refactored according to roadmap’s guidelines. Expect lots of BC breaks, but also greater testability and performance.