nHibernate

  • Thread starter Thread starter Jennifer Mathews
  • Start date Start date
J

Jennifer Mathews

This framework looks wonderful but before I even attempt to study it, I thought I would
ask.

Is anyone on this using or has used this framework? Any thoughts on it? What about
scalability?
 
Jennifer said:
This framework looks wonderful but before I even attempt to study it, I
thought I would ask.

Is anyone on this using or has used this framework? Any thoughts on
it? What about scalability?

nHibernate the ORM solution? Yeah I have used it. In a place I
contracted at, nHibernate was too slow, and they stopped using it.

The other contract I worked using nHibernate on the back-end of a WCF
Web service, again it was too slow and a nightmare.

I started using ADO.NET Entity Framework and never looked back. Soon,
the company I work for will move to VS 2010 and 4.0 Ado.NET Entity
Framework. 4.0 has a lot of nice features I could use right now, but I
am stuck on the 3.5 version.
 
Please. Can you explain a bit more about the "too slow" part? What kind of a load
(inserts\updates\deletes) were you using to the db?
 
Jennifer said:
Please. Can you explain a bit more about the "too slow" part? What
kind of a load (inserts\updates\deletes) were you using to the db?

An ORM solution being too slow is based on what type T-SQL is being put
together by the ORM to execute the query.

And what happens after the query such as what is happening as it
iterates over an IEnumerable query. Is it going back to the database on
each iteration.

Lazy loading as opposed to fast loading. A programmer must know what an
ORM in producing that software developers ignore and produce slow
solutions using ORM.

What happens if the developer starts using 'Includes' haphazardly or
Inner Joins? Does the ORM have features that can be enabled to speed-up
the query or speed-up the opening of the table views each time the ORM
opens the database based on the table views. Can views be precompiled?

That's what you need to pay attention too and not that it looks
wonderful. They all look wonderful until you start doing CRUD
operations. What is it doing when it does something?

You need to find a profiler to see what is happening.
 
Jennifer said:
This framework looks wonderful but before I even attempt to study it, I
thought I would ask.

Is anyone on this using or has used this framework? Any thoughts on it?
What about scalability?

NHibernate, like most O/RMs has a fairly steep learning curve.

We use NHibernate with ActiveRecord - to simplify matters.

When used properly, NHibernate is generally faster than Entity Framework.
http://fabiomaulo.blogspot.com/2009/09/why-don-choose-nhibernate.html

However, EF is relatively new and, I believe, rapidly improving.

http://ayende.com/Blog/archive/2010/01/05/nhibernate-vs.-entity-framework-4.0.aspx

As long as it's not used for something unintended - like batch
processing (where you should use ADO.NET instead), then you will get
good performance.

Scalability has more to do with your architecture/design than with the
O/RM you use, but it's powerful caching facilities will help here.

I've also heard good things about LLBLGen Pro, and Subsonic.

The main site for NHibernate is http://nhforge.org/

HTH
 
Jennifer said:
This framework looks wonderful but before I even attempt to study it, I
thought I would ask.

Is anyone on this using or has used this framework? Any thoughts on
it? What about scalability?

I've been using NHibernate in small to large scale applications, and am
very happy with it.

In contrast to Mr. Arnold, I didn't experience any performance problems
(in a similar scenario using WCF). This is not to say that they couldn't
exist or that it he did something wrong, just that I didn't experience
them.

In most cases, performance issues turned out to be not caused by
NHibernate, but by other parts of the application. Where NHibernate did
prove to be the problem, it was usually due to bad querying on the
programmers part. I have little to no experience with the Entity
Framework, so I can't really do a comparison.

In general, it's a robust, and well maintained framework. That does not
mean it doesn't has its quirks and little nasty caveats, but that goes
for every (orm)-framework you find.
 
Back
Top