开发者

ORM in Django vs. PHP Doctrine

开发者 https://www.devze.com 2023-01-07 21:05 出处:网络
I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don\'t have experience with Django. Can anyone who h

I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don't have experience with Django. Can anyone who has good knowledge of both Doctrine and ORM in Django give me a comparison of featu开发者_开发百科res of these two ORM implementations?


I am a rare person who had to switch from Django 1.4 to Symfony 2.1 so I had to use Doctrine 2 instead of current Django ORM.

Maybe Doctrine can do many things but let me tell you that it is a nightmare for me to use it coming from Django.

I'm bored with the verbosity of php/Symfony/Doctrine ...

Also I never needed something that Django's ORM didn't manage already (maybe projects not big enough to reach the limits).

Simply compare the description of data between both orms (including setters & getters)...


The Django ORM does everything I want it to do. I've found it to be easier to use and more straight-forward than Doctrine. Sorry that I can't help with an in-depth comparison.

If you find the Django ORM is missing a feature you'd like to have, check out SQL Alchemy. It can easily be used with Django.


Ive used Doctrine over a 2 year project that ended 1.5 years ago, since then i've been doing mostly Django.

I prefer Djangos ORM over Doctrine any day, more features, more consistency, faster and shinier.


Django isn't just an orm. It is a web framework like symfony. The form framework in symfony is modeled on django for example. It's orm part is more like doctrine 2 I think, but I haven't played with either much.

0

精彩评论

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