NHibernate 3 与 Fluent NHibernate 学习曲线?

发布于 2024-10-17 03:35:17 字数 233 浏览 5 评论 0原文

我从各地听说 NHibernate 3 的学习曲线非常巨大。从哪些角度来看它算巨大?您认为所需的学习取决于使用的场景吗?

示例:如果我只想要一些作用于 3 个实体的应用程序并且只寻找基本的 CRUD。是否有必要了解 NH 的整个概念?

想了解用户的体验并对此问题的答案进行一些解释。

编辑:您是否建议使用 NH 而不是 Entity Framework 4 ? (如果您都尝试过)

谢谢。

I hear from everywhere that NHibernate 3 learning curve is very huge. It is considered huge from which perspectives ? Do you think that the learning needed depend on the scenario it is used ?

Example: If i just want some application that act on 3 entities and only looking for basic crud. Is it necessary to understand the whole concept underlying NH ?

Would like to know users experiences with some explanation over your answer to this.

Edit: Do you recommend of using NH over Entity Framework 4 ? (if you tried both)

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

对你再特殊 2024-10-24 03:35:17

任何 ORM 都有一个学习曲线。一旦您学习了一个 ORM,学习第二个 ORM 就会变得更快。在大多数情况下,您首先学习哪种 ORM 并不重要(就学习速度而言)。

目前,我认为最初使用 EF4 可能比 NHibernate 更快,但从长远来看,我认为 NHibernate 是一个更好的选择。这些是目前值得花时间研究的两个主要 ORM。

一旦理解了 ORM,您在数据库访问方面的开发速度就会快得多。 ORM 还有其他好处,因此绝对值得继续学习。

There is a learning curve for any ORM. Once you've learned one ORM, learning a second ORM goes much faster. In most cases, it doesn't matter (learning speed wise) which ORM you learn first.

Currently, I think you can probably get going faster initially with EF4 than NHibernate, but over the long term I think NHibernate is a superior choice. Those are the main two ORMs worth spending time on at the moment.

Once you understand ORMs, your development speed will be much faster in regards to database access. There are other benefits to ORMs as well, so it's definitely worth taking that learning curve on.

旧人哭 2024-10-24 03:35:17

NHibernate 确实有一个学习曲线,但这完全取决于您的背景……

您是否熟悉 ORM 的概念?您有使用 Entity Framework 4 的经验吗?

为了构建一个具有 3 个实体/表和简单 CRUD 操作的简单应用程序,您不需要了解 NH 的核心,但是当您考虑扩展您正在构建的程序或您正在构建的程序时,问题就会开始出现。遇到错误或功能,你只会一路上发现......

我真的建议使用 NH,并且在具有小数据库的程序(例如你可能要处理的程序)上学习它总是更容易。

我还建议直接深入研究 Fluent NHibernate。这是一种完全不使用 XML 来映射实体的方法。

首先阅读 Fluent Nhibernate 主页 上的简介和“第一个项目”页面。
您可以在 ayende 的博客 中阅读有关 NHibernate 和 Fluent NHibernate 的更多信息。

NHibernate indeed does have a leaening curve, but it all depends what your background is...

Is the concept of ORM's familiar to you at all ? Do you have experience working with Entity Framework 4 ?

In order to build a simple application with 3 entities/tables and simple CRUD operations, you don't need to understand the core of NH, but problems will start to come up when you think of expanding the program you are building or the moment you run into bugs or features that you will only find out along the way...

I really suggest using NH, and learning it is always easier on programs with a small db like the one you're probably going to be working on.

I would also suggest diving straight into Fluent NHibernate. It's a way of mapping the entities without using XML at all.

Start out by reading the introduction and the 'first project' page at the Fluent Nhibernate homepage.
You can read alot more about NHibernate and Fluent NHibernate at ayende's blog.

猛虎独行 2024-10-24 03:35:17

您可以在一天内学习 NH 基础知识。相信我,它会得到回报。

You can learn the NH basics in a single day. And believe me, it will pay off.

儭儭莪哋寶赑 2024-10-24 03:35:17

我在 NH 之后学习了 EF,可以说,如果您要使用自动映射、POCO 对象等,那么学习将是一样的。

I learned EF after NH and can say that if you are going to use automappings, POCO objects etc then learning will be just the same.

唯憾梦倾城 2024-10-24 03:35:17

NHibernate 没有“陡峭、大、可怕的学习曲线”。

我只是阅读了 NHibernate(非常好,顺便说一句)手册。那是 v1.2,相信我,现在比那时好多了。

NHibernate has NOT a "steep, large, horrendous learning curve".

I learnt NHibernate just reading the (excellent, BTW) manual. It was v1.2 and, believe me, it is much better now than then.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文