Friday, August 11, 2006

ORM: The Second Coming

I used Hibernate on a Java project last year. The endeavor was successful but the learning curve was steep and I recall some painful moments. By the time that we were done I had concluded that ORMs definitely could like up to their potential but it was going to be the third or fourth implementation before I really became comfortable with them. Since then I've spent my time in the .NET wilderness but always on existing projects that already had a Data Access Layer.

This recently changed when a brand spanking new .NET 2.0 project came my way. I decided to use NHibernate for no hassle data access. I like to understand the basics first so initially I implemented something simple using nothing more than the documentation on the website and some vague recollections from last year. However very quickly I had a functional and transactional parent-child relationship.

Next I started to look for an optimal approach. Once again I found an excellent article by Billy McCafferty. A lot of reasonably advanced concepts are tackled but the result is sweet. And there's a gold-mine of things to learn for anyone who wants to sharpen their skills.

With an entire (and ostly reusable) Data Access Layer completed in only a few days I'm next going to tackle Dependency Injection...


Post a Comment

<< Home