Lightspeed 与 NHibernate
LightSpeed 的体验如何? Mindscape 提供的比较并没有过多说明 NHibernate。 Lightspeed 看起来很灵活,但我没有看到太多关于性能的信息。 光速的表现如何? 使用 Lightspeed 有什么缺点吗?
What is the experience with LightSpeed? The comparison provided by Mindscape doesn't say too much about NHibernate. Lightspeed seems flexible, but I don't see much about performance. How well does Lightspeed perform? Also are there any drawbacks to using Lightspeed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
关于性能,从此页面
不要低估这一点。 这意味着如果您加载包含 200 个项目的列表,大多数 ORM 在很多情况下将运行 201 个查询。 光速则不然。 它是(非常)少数不这样做的之一。
如果您正在寻找在一些边缘情况下快 100 毫秒的东西,祝您基准测试好运。 理论上我喜欢 NH,而且我认为我永远不会不使用 ORM,但对于我所做的大部分工作来说,NH 完全是矫枉过正 - 我最终花了很多时间维护元数据、类文件、映射等等,测试起来……很有趣。 好吧,无论如何,这是给我们的。
On performance, from this page
Dont underestimate this. This means if you load a list of 200 items, MOST ORM's will run 201 queries in a lot of cases. Lightspeed doesn't. It's one of the (very) few that dont.
If you are looking for something which is a few 100ms quicker in a few edge cases, good luck benchmarking stuff. I like NH in theory, and I dont think I'd ever NOT use an ORM, but for most of what I've done, NH is total overkill - I end up spending so much time maintaining the meta data, class files, mappings et al, and it's ... interesting ... to test. well, it was for us, anyway.
我最近快速浏览了两者。 Lightspeed 给我留下的印象是:
对我来说最令人震惊的是他们严重依赖约定,并且在大多数情况下似乎没有重写。 因此,在决定如何准确绘制事物时,我的选择并不像我想要的那么好。 据说 Lightspeed 3 将解决这个问题,让你可以进行更多的定制。
由于所有的 XML,我远离了 NHibernate,但后来发现了 Fluent NHibernate,看起来它会工作得很好。 没有设计师的支持,尽管有些人可能会说这是设计使然(专注于您的对象)。 NHibernate 似乎也是 .NET 最常用的 ORM,因此从这个意义上来说,它是一个“安全”的赌注。 到目前为止,它已经能够绘制出我能想到的大部分内容。
无论如何,由于定制限制,我对 Lightspeed 的了解并不多。 如果我开始一个可以符合他们惯例的新项目,情况可能会有所不同。 该公司反应灵敏,我真的很想使用他们的产品之一:)。
I recently took a quick look at both. What impressed me with Lightspeed is:
What was a showstopper for me was that they heavily rely on conventions, and there doesn't seem to be overrides in most cases. So my options when it comes to deciding exactly how things get mapped were not as good as I wanted. Supposedly Lightspeed 3 will address this to allow you to do more customization.
I stayed away from NHibernate because of all the XML, but then found Fluent NHibernate and it looks like it'll work out pretty well. There's no designer support, although some might say that's by design (focus on your objects). NHibernate also seems to be the most used ORM for .NET so it's a "safe" bet in that sense. So far it's been able to map most of what I can come up with.
At any rate, I didn't get very far with Lightspeed because of the customization limitations. If I was starting a fresh project that could conform to their conventions, it might be a different story. The company is so responsive, I would really like to use one of their products :).
我最近比较了一大组 ORM,包括 NH 和 Lightspeed。 我专业使用 NH,所以我有点偏见,这篇文章是 这里。
I did comparison of a large set of ORMs recently, including NH and Lightspeed. I use NH professionally so I'm a bit biased, the article is here.
我已经使用 Lightspeed 几个月了,但我是 .NET 的新手,所以从未使用过 NHibernate。 到目前为止,我发现它非常容易使用,学习曲线很小,并且它在不断更新。 对我来说最大的优点是支持。查询通常会在很短的时间内得到答复,发现的任何错误通常会在第二天修复并在夜间构建中提供。
不确定“Lightspeed 的表现如何”是什么意思? 这家伙看起来很高兴{:o)
http://omarbesiso.spaces.live.com/blog/cns! 70A5B53D721071B7!473.entry
I've been using Lightspeed for a few months, but I'm a newbie in .NET, so have never used NHibernate. Up to now I have found it pretty easy to use with a small learning curve and it is constantly being updated. The big plus for me is the support.Queries usually get answered within a very short space of time and any bugs found are often fixed by the following day and available in the nightly build.
Not sure what you mean by "how well Lightspeed performs" ? This guy seems pretty happy {:o)
http://omarbesiso.spaces.live.com/blog/cns!70A5B53D721071B7!473.entry
去年,我在新西兰奥克兰的 TechEd 上与该产品的一位首席开发人员(Jeremy Boyd)进行了交谈,并问了这个问题。 他似乎认为它比 NHibernate 快几个数量级。 当然,这是他的产品,所以他会这么说,但我认为值得一提。
I had a chat to one of the lead developers of this product (Jeremy Boyd) at last years TechEd in Auckland NZ, and asked this very question. He seemed to think that it was several orders of magnitude faster than NHibernate. It's his product of course so he's going to say that, but I thought it worth mentioning.
在过去的六个月里,我在工作中使用 NHibernate 和 Active Record,在业余时间在家中使用 LightSpeed。
优点/缺点
到目前为止,我发现 LightSpeed 和 NHibernate with Active Record 都很容易学习。
我还没有发现 LightSpeed 的缺点。 我最喜欢的功能是:
我最喜欢 Active Record 的功能是:
Active Record 对我来说的缺点是:
性能
我(还)还没有并排比较这两种产品并对它们进行同等的性能测试。
我猜测 NHibernate 存在更深层次的类层次结构。 在使用 ANTS Profiler 优化我的代码时,我发现对于一个简单的查询,在生成实际的 SQL 查询之前,会通过 NHibernate 类进行一次又一次的调用。
当然,生成的查询将对 ORM 的最终性能产生重大影响。
LightSpeed 和 NHibernate 都提供延迟加载,而 Active Record 使 NHibernate 可以轻松实现这一点。
我认为使用 Lightspeed 和 Linq 来优化查询更容易,并且对于维护代码的人员来说更清晰。 然而通常不建议编写 NHibernate HQL。
Over the past six months, I've been using NHibernate with Active Record at work, and LightSpeed at home in my spare time.
Advantages / Drawbacks
So far, I've found both LightSpeed and NHibernate with Active Record to be straightforward to learn.
I haven't found drawbacks with LightSpeed (yet). The features I like most are:
The features I like most about Active Record are:
The drawbacks of Active Record for me are:
Performance
I haven't (yet) compared both products side by side and run performance tests on both equally.
I would guess that NHibernate suffers from a deeper class hierarchy. While optimising my code using ANTS Profiler, I found that for a simple query there is call after call through NHibernate classes before the actual SQL query is produced.
Of course, it's the query that is produced that will make all the difference to the ultimate performance of the ORM.
Both LightSpeed and NHibernate offer lazy loading, and Active Record makes this easy for NHibernate.
I think it is easier to optimise your queries using Lightspeed with Linq, and more clear to people maintaining your code. Whereas it's not usually recommended to write NHibernate HQL.