开发者

What are the differences between Doctrine1 and Doctrine2?

I have only started discovering Doctrine and noticed the official documentation points to 1.2 as this seems to be the current stable version.

I also noticed that a lot of people seem to mention Doctrine 2 is a "world of difference" compared to Doctrine 1, but when looking at the What's new page, I don't really see an extensive changelog. I am guessing this list only shows the newest additions compared to the previous 2.x build. I expected to find a nice roundup of differences after Googling this same question, but I can not seem it.

I am currently plowing through the Doctrine 1 manual, and will do the same for Doctrine 2 as soon as I finish reading it, but a proper overview of the big changes would be really appreciated, so my question is:

What are the differences between Doctrine1 and 开发者_如何学JAVADoctrine2?


Well... Doctrine1 and Doctrine2 are totally incomparable as they realize completely different approaches.

  1. Doctrine1 implements ActiveRecord design while D2 implements DataMapper design - that's the most important difference.
  2. D2 requires PHP 5.3 or newer and uses its benefits like namespaces.
  3. D2 is divided into set of smaller subprojects: Doctrine Commons, Doctrine DBAL, Doctrine ORM (for RDBMS) and Doctrine ODM (for MongoDB).
  4. D2 is much faster.
  5. D2 supports annotations.

Although D2 isn't still stable it's the future so don't waste time for learning D1.


Take a look at this presentation (and maybe some of the related others), really nice!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜