The State of Entity Framework and NHibernate
Some time ago, I compared NHibernate and Entity Framework. It was from a very technical point of view, and I think it is still up to date. Today, I want to talk about the current state of things, from a less technical stand.
First, let me just say the obvious: NHibernate originated and is driven by the community, while Entity Framework is a Microsoft product. This makes all the difference in the world.
Entity Framework has a roadmap, a plan and a permanent team focused on the product, while NHibernate has nothing like this. The NHibernate community consists of some very talented programmers who spend some of their free time working on NHibernate just for the fun of it. However, it is not their main occupation, and so many questions and community requests get unanswered, reported issues pile up, parts of the codebase are really not very good and there are several remarkable features missing – the NHibernate guys used to bash Entity Framework for not supporting enumerated types, but NHibernate, in 2013, still targets .NET 3.5, does not support left joins in LINQ queries, is scarcely documented and still requires the usage of an obscure collection library called Iesi.Collections. Of course, being a community thing, anyone can jump in and help with this, and in fact, there are lots of people contributing with pull requests, suggestions and bug reports. NHibernate’s problem, in my opinion, is lack of leadership. As far as I know, it is not known if the next version of NHibernate will be 3.4 or 4, and what will be there, except, of course, bug fixes, and even less what will NHibernate evolve to, when will it support .NET 4.5 constructs such as async, and so on. The NHibernate Development list is very quiet, and these questions, as well as lots of others, have had no response to this date.
While Entity Framework’s functionality is way behind NHibernate – and believe me, it really is – it is gaining ground. Entity Framework has a leader, a well known team which makes its discussions publicly available and takes suggestions from the community in the form of requests and even code patches, some of which have already been incorporated in the main product. The next major version, 6, was announced some time ago, public betas already exist – and, of course, anyone can get the current version from CodePlex – and it points to a direction. Granted, it is not going to address any of NHibernate’s stronger points, but instead it is moving with what appears to be the current trend, namely, asynchronicity, .NET 4.5 integration and conventions.
I don’t think NHibernate is dead yet, but some things really need to change to make it a modern competitor to other O/RMs, if there is interest in it. There are other things than just functionality.