选择实体框架作为默认实现ORM对Nhibernate,cons和pros? [英] Choosing Entity framework as default implementation ORM against Nhibernate, cons and pros?

查看:116
本文介绍了选择实体框架作为默认实现ORM对Nhibernate,cons和pros?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一家开发中小型网络项目的开发公司,我们主要使用微软技术,目前我们正处于技术选择阶段,我们正在研究ORM,我们需要选择标准的ORM对于我们未来的项目,现在我们将选择缩小到两个: -



•Nhibernate: -


  1. 成熟。

  2. 开源。

  3. 功能丰富。

  4. 可配置且灵活

  5. 很好的社区支持。

  6. 证明是成功的许多地方。

•EntityFramework: -


  1. Microsoft产品;这意味着与其他Microsoft产品的紧密集成。

  2. 在线支持和大量资源,网络相当强大。

  3. 演进速度非常快,修复正在快速发展,日益增长。

  4. LINQ。

  5. 学习曲线比Nhibernate低。

技术分别按照以下内容进行衡量: -


  1. 易于使用 - 时间在我们的项目中确实是至关重要的。

  2. 长期决定,我的意思是我们不会去
    不断的技术转移。 >
  3. 与Microsoft产品集成。

  4. 根据合规工具(如Nhibernate的activerecord),社区和版本支持。

  5. 这将是我们使用的唯一标准。

  6. 灵活配置。

  7. 功能 - 我们不需要很多复杂的映射,也不需要二级缓存,现在我们可以用SP替换批处理。

我的问题为Nhibernate选择实体框架,作为我们公司未来的ORM默认实现,从长远来看,这种决定的缺点和优势是什么?



不要误会我我知道Nhibernate暂时是正确的答案,但是在不久的将来,甚至是远未来,它将成为正确的选择。考虑到EntityFramework的快速发展。






我在研究中依赖的一些资源: -



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



NHibernate,实体框架,活动记录或linq2sql



我应该使用哪种ORM工具来进行.Net开发



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

解决方案


我知道Nhibernate暂时是正确的答案,但是
将在不久的将来成为正确的选择,甚至是远
未来,考虑到EntityFramework的快速发展。


没有人可以回答这个问题。我相信即使是ADO.NET团队也会遇到这样的问题,因为在这个时候,甚至还没有将要实施的功能的路线图。目前,开发过程主要由 Data UserVoice 驱动没有办法知道我们下个月可以预期哪些功能,明年可以预期哪些功能,以及我们将永远不会拥有的功能。






没有正确的答案。此外,您正在努力做的整个标准化过程是错误的。为您当前的问题使用正确的解决方案!选择单一的标准,无论什么问题,您将来不用解决,而不知道这个问题,而不知道什么工具将在当时可用是一个愚蠢。



您的整个想法违反了敏捷性和最佳做法。它甚至可以发展到内部框架或SW工厂。 .NET开发是高度动态的领域。今天可以假设好的选择可以在明年废除,所以不要束缚标准。在未来还有更有趣的选择或更有趣的技术和实践转变(例如NoSql数据库)。



如果您希望长时间的战略解决方案使用大型机和COBOL。他们已经证明了自己的一生。


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

解决方案

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.

这篇关于选择实体框架作为默认实现ORM对Nhibernate,cons和pros?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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