After exploring a lot about zf2 database and model chapter: i did not understand what is most preferable for database part whether to use Tablegateway(As mentioned in the document file) or zend_db or doctrine2(ORM).
Like which one more features over others.
i need some clarification here..
Thank you
Zend_DB (zf1 ?) or Zend\DB (zf2) is a components of ZF which contain in it TableGateway.
Doctrine is an ORM (Object Relational Mapper).
Now this post is possibly duplicate of This question On Stack
It says :
Out-of-the-box Zend_Db is more just an enhanced Database Abstraction Layer on top of PDO, where as Doctrine 2 is a Object Relational Mapper (which sits on top of it's own DBAL).
Doctrine 2 is much better for more complicated domain layers, because all your business logic, persistence logic, etc are separated over multiple classes, so they don't serve multiple roles. Also, because you have more classes - that are cleaner and loosely-coupled - it makes testing them much easier.