ZendFramework 1 vs ZendFramework 2

What is major difference between ZendFramework1 and ZendFramework2

  1. ZF1 Support MVC Architecture while ZF2 support MVC and MOVE both
  2. ZF2 brought new concept Dependency Injection
  3. 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.
  4. ZF2 is little bit slow as compared to ZF1. But it has evovled a lot from ZF1 to ZF2.
  5. 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
  6. ZF2 There is no application level Bootstraping, each module is responsible for its own bootstraping in module.php file located in each module.
  7. ZF2 routing is fundamentally changed. There is no application level routing, instead, routing is added on a per-module basis.
  8. ZF2 Zend_Registry doesn’t exist in ZF2, it has been indirectly been replaced by ZendServiceManager
  9. 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

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *


5 × = forty five