Choosing Entity framework as default implementatio

2019-07-21 15:05发布

I’m working in a development company, which develops small to medium size web based projects, we mainly use Microsoft technology, currently we are in technology selection phase, and we are looking into ORMs, we need to select the standard ORM for our future projects, for now we narrowed the chooses into two: -

• Nhibernate: -

  1. Mature.
  2. Open source.
  3. Feature rich.
  4. Configurable and flexible, to the highest extends.
  5. Well supported by a strong community.
  6. Proven to be successful many places.

• EntityFramework : -

  1. A Microsoft product; which means tight integration with other Microsoft products.
  2. Highly Supported and plenty of resources online, with fairly strong communities online.
  3. Evolving very fast, fixes is coming out very fast and it is getting better day by day.
  4. LINQ.
  5. Lower learning curve than Nhibernate.

The technology is measured according to the following respectively: -

  1. Ease of use - time is really a critical thing in our project.
  2. Long term decision, I’m mean we are not going to keep shifting between technologies.
  3. Integration with Microsoft products.
  4. Support, in term of compliance tools (such as activerecord for Nhibernate), communities and releases.
  5. It’ll be the only standards that we’ll use.
  6. Flexibility in configuration.
  7. Features - we don't require a lot of complex mapping, nor 2nd level caching, and we can replace batching with SPs for now.

My Questions Choosing Entity Framework against Nhibernate, as our company future default implementation of ORM, what are the cons and pros for such a decision in the long run?

Don’t get me wrong on this; I know that Nhibernate is the right answer for the time being, but will it be the right choice for the near future, or even the far future, taking is consideration the fast evolution of EntityFramework.


some of the resources I have relied on with my research: -

http://ayende.com/blog/4351/nhibernate-vs-entity-framework-4-0

NHibernate, Entity Framework, active records or linq2sql

Which ORM tool should I use for .Net development

http://blogs.msdn.com/b/adonet/archive/2012/03/22/ef5-beta-2-available-on-nuget.aspx

2条回答
啃猪蹄的小仙女
2楼-- · 2019-07-21 15:14

I know that Nhibernate is the right answer for the time being, but will it be the right choice for the near future, or even the far future, taking is consideration the fast evolution of EntityFramework.

Nobody can answer this question. I believe even ADO.NET team would have problem with this because at this time there is even no road map for features that will be implemented in the future. At the moment the development process is mostly driven by Data UserVoice and there is no way to know which features we can expect next month, which features we can expect next year and which features we will never have.


There is no right answer. Moreover whole "standardization" process you are trying to do is wrong. Use the right solution for your current problem! Selecting single "standard" for whatever problem you will have to solve in the future without knowing that problem and without knowing what tools will be available in that time is a stupidity.

Your whole idea goes against agility and against best practices. It can even grow to internal frameworks or SW factories. .NET development is highly dynamic area. What can be supposed good choice today can be deprecated next year so don't bind yourselves with "standards". There can be even more interesting choice in the future or more interesting shift in technology and practices (for example NoSql databases).

If you want long time strategic solution use mainframes and COBOL. They already proved their lifetime.

查看更多
唯我独甜
3楼-- · 2019-07-21 15:25

I would recommend that, in making your decision, you concentrate on the features available from NHibernate and EF right now. Look at the precise requirements you have to hand and match them up against the ORMs. In your question above, you should note that it is also possible to execute linq queries against NHibernate. Also, you've discounted the need for 2nd level caching. If you are looking for a long-term flexible platform, you should definitely take it into account.

查看更多
登录 后发表回答