Zend Framework TDG vs Doctrine [duplicate]

2019-02-13 14:59发布

Possible Duplicate:
When should use doctrine ORM and when zend-db-table?

In short, what is better and why ?

I currently using Zend Framework TDG but am considering move to Doctrine.

Could that someone who already moved to Doctrine (from Zend FW TDG) says the experience? Is it better, faster, more flexible, and why do I have (and anybody) move to Doctrine, or why not?

Thanks in advance.

1条回答
贪生不怕死
2楼-- · 2019-02-13 15:03

Doctrine is much more flexible then Zend (ORM?). You cannot really compare those two because Zend has to focus on many aspects in their framework and Doctrine only focusses on the ORM/DBAL side of their 'framework'. From this approach Doctrine will be always one step ahead compared to Zend in ORM.

What I like from Doctrine compared to ZF is you can write code really fast and simple and it's flexibillity. Things like the Doctrine command line tool to update your schema from your entities, mapping to relations and lazy fetching, work with entities in your DQL (e.g.'FROM Entity\Donation d WHERE d.user = :user' and :user is simple a user entity object)

The AST which makes you easy to write custom TreeWalkers to maninpulate DQL and Query structure before converted to SQL, which I use a lot in my own project Pike_Grid.

查看更多
登录 后发表回答