Ron Jacobs discusses NHibernate on the MS Patterns and Practices Arcast – level 200

The lates Arcast from Ron Jacobs is about NHibernate, and open-source Object-Relational mapping tool.  This podcast was particularly interesting to me because my team is using NHibernate for a project, and we are likely to use it for most data access going forward.  The data access tier is the target of many debates.  My team has weighed the pros and cons, assessed our security and performance requirements, and we have decided that using NHibernate to automate the persistence and loading of our business objects is the direction we want to go.  In has saved so many developer hours of writing boring CRUD sprocs and sql statements.  We use an xml file to map the properties of our business object to the database table, and we’re done.  We have a test-bed of integration tests to ensure that the mapping is correct.

Ron brought up an argument that some inside Microsoft have on OR mappers.  I’m paraphrasing, but this is the idea:  Developers may shoot themselves in the foot if Microsoft provides an OR mapper and endorses it. 

I’ll let that sink in.  I can’t remember a development tool that someone hasn’t managed to abuse.  Hmm.  That doesn’t seem to be a very strong argument.  You obviously don’t give an M1 Abrams tank to a novice, but in the hands of a trained professional soldier, it can be very effective.

Another point discussed was that you no longer have complete control over performance with NHibernate.  That’s true because you would be trusting the component to generate and run the sql for you.  You obviously don’t use the exact same tool for every job, and it was mentioned that the Amazon.com(s) of the world would need more control over data access than most enterprise applications.  Most internal enterprise applications only have a few hundred users (if that).  What performance do they really need?  Now, NHibernate is NOT slow, but  if you need to go 400 MPH instead of a measley 397MPH, then you have some pretty heavy traffic and strict performance requirements.  For the rest of applications, NHibernate probably offers more speed than required.

Another topic of great interest to me:  The cancelled Ojbect Spaces project.  It was mentioned that it was cancelled because of the DLinq project that was developing, and Microsoft didn’t want to have two models for OR mapping.  I’m not sure about the details of this, but it was mentioned on the show.

All in all, I like podcasts from Ron Jacobs.  He’s a great personality for a radio show, and he pulls in some interesting topics.