Maybe you already posted some blog about this.. don't know, but can you tell some advantages of DO in comparison of EF4.0? I am speaking about performance (yes I saw ormbattle.org) and features set.. did you notice some really noticable drawbacks/issues of EF4.0 which DO has already solved? Thanks, David Updated at 22.04.2010 16:48:59thanks for the extensive answer, it may be good for you and DO to blog this so others can read about the comparison ;) so far I am quite impressed with DO, I think that one feature you should think about is the legacy db support, e.g. I am missing the reverse-engineering of existing DB, better mapping support (e.g. explicitly specifying association table for many-to-many collections) and maybe better documentation (O2O, DisconnectedState). David This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by david_csharp. |
Dmitri Maximov (Xtensive) wrote:Hello David, Here is brief comparison: DO4 - pros:
EF4 - cons:
Alex (Xtensive) wrote:Few more diffs: 1) DO4 is designed to handle server-side operations well - it provides really transparent view on data. EF does not - the part of database you access must always reside in memory; rollbacks and attempts to access the same data don't lead to any refreshes there. Some consequences:
So DO4's model is more suitable for implementing complex server-side logic. EF's model works better if operations executed from UI are purely CRUD operations - i.e. WCF Data Services-like RESTful APIs are fully sufficient for you. Let's illustrate this on examples:
Or, shorter, if you expect there will be 50+ persistent types + some complex logic, DO4 might be a better choice. Btw, just think about maintaining database schema for an application with e.g. 500 persistent types. 2) DO4 offers high-level abstractions by default:
3) DO4 is designed for model-first & code-first development; legacy mode is relatively new here. On contrary, EF provides good support for legacy databases, model-first mode isn't the primary option here. So if you're developing a new application, DO4 might be more attractive. Take a look at our tests: there is no need to care about database schema and so on. This is really convenient: modify & refactory you classes, start the application - voila! Everything works. DO might also be a good choice if legacy database has lots of tables (and it's ok to have restrictions DomainUpgradeMode.Legacy has). The next section describes, why. 4) DO4 works very well with large models. Mainly, because it doesn't require you to use a designer (you can use built-in VS.NET class designer, but currently we don't provide any DO4-specific extensions for it). As far as I can judge, many of ORM tools providing class designer integrated into VS.NET are simply not adopted for this case. E.g. currently both EF and L2S might require up to 10 minutes to just open a database diagram with 500+ tables. An attempt to navigate there makes VS.NET to hang for minutes as well. It seems that's mainly related to really complex nature & model provided by VS.NET DSL Tools - most of class diagram editors for VS.NET are based on this toolset. I'm not sure about commercial tools here, such as Lightspeed - if you consider them and expect your project will b large, it's better to contact the vendor and ask about the largest model(s) used by their customers. 5) DO4 provider model is designed to support indexing engines as well. And although currently there is just in-memory provider acting more as "demo", in future we will deliver few more of them. So likely, in future DO4 will be a better choice for integration into relatively small applications, since you won't need anythign additional. 6) POCO support. Currently DO4 doesn't support POCO, although we're seriosuly thinking about providing support for it in future (~= transparent O2O mapping between our own and POCO entities). Let's see. 7) EF is Microsoft product with all the consequences. In particular:
The advantages we offer here include:
Thanks for your reply - yep, Dmitri Maximov also suggested to publish the summary from this thread in our blog. So I'll do this shortly. |