Wednesday, September 05, 2007

NHibernate vs Entity Framework

Although Microsoft claims that the new Entity Framework is really not an OR/M product, if you look closely at the examples and the whitepapers, you'll agree with me that they are very similar. Nhibernate is an awesome product, and I've been using it for a long time now, but it currently has two major drawbacks. First, there are no serious GUI tools assisting in the creation of mapping files and/or business classes. Second, various rumours indicate that further development (other than bugfixes) is uncertain at this time. Well, if you tried the new Entity Framework tools for Visual Studio 2008, you must love the integrated environment. And obviously, LINQ is much better than NHibernate's expression object model and HQL language. Nevertheless, until we have support for the major important database vendors, the EF is no real competiter yet. Luckely, there is good news on the horizon.

PS. If you have problems trying to get the CTP tools to work, see this post. It might help.

4 comments:

Ayende Rahien said...

1. Please check Active Writer, it is a GUI on VS that supports generating NHibernate and Active Record classes.
2. Not only there are no plans to stop developing NHibernate, but we are actively working on the next version, and adding all sorts of really nice features to boot.
3. There is already a linq for NHibernate implementation out.

Tobin Harris said...

There is a LINQ for NHibernate under development too, which will be a beauty!

Plus, we get a book! NHibnernate in Action is due out after Xmas 2007 sometime (I'm involved with that one!)

Anonymous said...

I've used both and I prefer nhibernate. It has a couple features that entity framework is missing and one key thing is that I find the configuration files much easier to work with. With entity framework, if you need to do somethign that can't be done from the Gui, the configuration backend is much more convoluted

Gareth Hayter said...

Visual NHibernate provides a GUI for creating and maintaining NHibernate projects: http://www.slyce.com