Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Over the past six months, I've been using NHibernate with Active Record at work, and LightSpeed at home in my spare time.</p> <p><strong>Advantages / Drawbacks</strong> So far, I've found both LightSpeed and NHibernate with Active Record to be straightforward to learn. </p> <p>I haven't found drawbacks with LightSpeed (yet). The features I like most are:</p> <ul> <li>Convention over configuration. This saves a lot of time and provides consistent code.</li> <li>The model class and config generator.</li> <li>Support for Linq and MySQL 5.</li> </ul> <p>The features I like most about Active Record are:</p> <ul> <li>No XML configuration required, the most common configuration options are provided automatically.</li> <li>NHibernate's flexibility is still available when required (e.g. criteria queries).</li> </ul> <p>The drawbacks of Active Record for me are:</p> <ul> <li>There appear to be more Ruby on Rails code examples than C# examples</li> </ul> <p><strong>Performance</strong> I haven't (yet) compared both products side by side and run performance tests on both equally.</p> <p>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.</p> <p>Of course, it's the query that is produced that will make all the difference to the ultimate performance of the ORM.</p> <p>Both LightSpeed and NHibernate offer lazy loading, and Active Record makes this easy for NHibernate.</p> <p>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.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload