光速VS NHibernate的

问题描述:

什么是光速的经验?通过思维空间所提供的比较并没有说太多关于NHibernate的。光速似乎灵活,但我没有看到太多关于业绩。程度如何光速执行?此外还有什么缺点利用光速?

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?

在过去的六个月里,我一直在使用NHibernate的,在我的业余时间活动记录在工作和光速在家里已经。

Over the past six months, I've been using NHibernate with Active Record at work, and LightSpeed at home in my spare time.

优点/缺点 到目前为止,我发现这两个光速和NHibernate与活动记录是直截了当地学习。

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:

  • 在约定优于配置。这节省了大量的时间,并提供一致的code。
  • 在模型类和配置发电机。
  • 支持LINQ和MySQL的5。

我最喜欢的Active Record的特点是:

The features I like most about Active Record are:

  • 不需要XML配置,最常见的配置选项自动提供。
  • 在需要时(如标准查询)NHibernate的灵活性仍然可用。

活动记录对我的缺点是:

The drawbacks of Active Record for me are:

  • 似乎有更多的Ruby on Rails $比C#例C $ C例子

性能 我还没有(还)相比,这两种产品并排运行性能测试都同样。

Performance I haven't (yet) compared both products side by side and run performance tests on both equally.

我猜想,NHibernate的从更深的类层次结构受到影响。同时优化我用蚂​​蚁探查code,我发现了一个简单的查询存在通过NHibernate的类调用后调用实际的SQL查询产生了。

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.

当然,这是所产生的查询,这将使所有的差异到ORM的极致表现。

Of course, it's the query that is produced that will make all the difference to the ultimate performance of the ORM.

这两个光速和NHibernate提供延迟加载和活动记录使这容易让NHibernate的。

Both LightSpeed and NHibernate offer lazy loading, and Active Record makes this easy for NHibernate.

我觉得它更容易使用光速使用LINQ来优化你的查询,以及更清晰的人保持你的code。虽然它不是通常建议写NHibernate的HQL。

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.