views:

1578

answers:

6

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?

+3  A: 

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

paul Bibby
Yes - Mindscape are great at answering questions. It goes a long way tp make up for the skint documentation that the product ships with. If you want to see how well Lightspeed performs against SQL server, open up the SQL profiler and watch the queries that it generates... you might be surprised to see that it's not that perfromant after all!
Mark
+5  A: 

I recently took a quick look at both. What impressed me with Lightspeed is:

  • Their tools which work very well (best VS designers I've ever used, I think).
  • Very fast responses. They answered questions and added features.

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 :).

MichaelGG
+1  A: 

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.

Bayard Randel
That claim, without significant qualifications, sounds extremely suspicious. ORMs don't tend to add enough overhead to a remote database call to even be noticeable in many situations.
Michael Maddox
+9  A: 

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:

  • Convention over configuration. This saves a lot of time and provides consistent code.
  • The model class and config generator.
  • Support for Linq and MySQL 5.

The features I like most about Active Record are:

  • No XML configuration required, the most common configuration options are provided automatically.
  • NHibernate's flexibility is still available when required (e.g. criteria queries).

The drawbacks of Active Record for me are:

  • There appear to be more Ruby on Rails code examples than C# examples

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.

Daniel Robinson
The only thing that RoR ActiveRecord and Castle ActiveRecord is that they both implement the same pattern. They don't share anything beyond that.
Mauricio Scheffer
Lightspeed's drawbacks: Primary keys always have to be called *Id* in the model, and Lightspeed expects them to be a single, auto-calculated field.Per their own website: "We don't expect primary keys to have any business value". The composite key support is somewhat lacking, and inspecting the SQL profiler while running LINQ queries reveals that their implementation is far from complete... neither caching nor projections work correctly using LINQ (though Mindscape's proprietary mechanism works as promised).
Mark
+5  A: 

On performance, from this page

Eager & lazy loading No N+1 problem. Includes "named aggregates." That is, giving a name to particular eager load graph. Watch the screencast.

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.

Nic Wise
If mapping is a problem, use Fluent-NHibernate or ActiveRecord
Mauricio Scheffer
+1  A: 

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.

Chris S
looks like his article has moved here: http://www.shrinkrays.net/articles/a-look-at-net-object-relational-mapper-orms.aspx
Myster
Thanks, updated it
Chris S