What is major difference between ZendFramework1 and ZendFramework2
- ZF1 Support MVC Architecture while ZF2 support MVC and MOVE both
- ZF2 brought new concept Dependency Injection
- ZF2 is based on PHP 5.3 and support namespaces, so class name naming convention has changed from classname Zend_Db_Table (ZF1) for class in Zend/Db/Table.php whereas in ZF2, it is class MyAuthAdapter.
- ZF2 is little bit slow as compared to ZF1. But it has evovled a lot from ZF1 to ZF2.
- ZF2’s modules really are modular. You can drop in someone else’s module, and with a simple line added to your application config file, you can be up and running in seconds
- ZF2 There is no application level Bootstraping, each module is responsible for its own bootstraping in module.php file located in each module.
- ZF2 routing is fundamentally changed. There is no application level routing, instead, routing is added on a per-module basis.
- ZF2
Zend_Registry
doesn’t exist in ZF2, it has been indirectly been replaced byZendServiceManager
- ZF2 Introduce Event Manager. Event Manager (EM) allows you to attach code to discrete events that may (or may not) happen in your application.
Sources:
- http://php.net/releases/5_3_0.php
- http://framework.zend.com/manual/2.0/en/tutorials/quickstart.di.html
- http://blog.hock.in/zf2-for-zf1-users-part-1
- http://blog.hock.in/zf2-for-zf1-users-part-2