Zend框架TDG vs主义 [英] Zend Framework TDG vs Doctrine

查看:114
本文介绍了Zend框架TDG vs主义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

什么时候应该使用doctrine ORM和zend-db-table?

简而言之,什么是更好的,为什么?

In short, what is better and why ?

我目前使用Zend Framework TDG,但正在考虑移至Doctrine。

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

可能有人已经转移到Doctrine(从Zend FW TDG)说经验?
更好,更快,更灵活,为什么我有(和任何人)移动到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?

提前感谢。 / p>

Thanks in advance.

推荐答案

教条比Zend(ORM?)更加灵活。你不能真正比较这两个,因为Zend必须关注框架中的许多方面,而Doctrine只集中在他们的框架的ORM / DBAL方面。从这种方法来看,与ORF中的Zend相比,Doctrine将会一直比前进一步。

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.

我从Doctrine中获得的喜欢与ZF相比,你可以编写代码真的很简单, flexibillity。像Doctrine命令行工具一样,从您的实体更新模式,映射到关系和延迟提取,使用DQL中的实体(例如FROM Entity\Donation d WHERE d.user =:user和:user是简单的一个用户实体对象)

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)

AST可以让您轻松编写自定义TreeWalkers,以便在转换为SQL之前管理DQL和Query结构,我在我自己的项目中使用了很多Pike_Grid。

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.

这篇关于Zend框架TDG vs主义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆