LINQ to Entities vs. NHibernate
At the MVP Summit I got a chance to participate in a great, vehement, passionate, and deep conversation about the forthcoming ADO.NET Entity Framework with the Microsoft team responsible and some of the main leaders of the Agile .NET community.
A recent post from Jeremy Miller:
I am putting a post together on what we saw from Linq to Entities this week, but let’s just say that I thought the only compelling technical advantage it had over NHibernate is Linq queries. One of the smart aleck comments somebody made was that Ayende would probably add a Linq front-end to NHibernate over a long weekend.
I can’t agree on his the only “compelling technical advantage” comment. Perhaps true from the standpoint of what ships with Orcas release of VS, but as a long term vision I think we need to seriously consider this as a positive step.
What’s coming is not an ORM, therefore there is no comparing the two.
In the traditional ORM (NHibernate) world you have two models: domain objects and database. The mapping is there to, well, map the two worlds: to bring them together. It’s there to solve the (generally overhyped) impendence mismatch.
That said, EDM (Entity Data Model) is a logical representation of a data model. The framework will permit various “services” to be attached to this model such as domain objects/models containing behavior (which is what we want to test and test-drive after all) replete with LINQ queries, reports, mock and test data generation, entity aggregation type service endpoints, etc.
With EDM and its associated platform, OR mapping is merely one facility (of many) possible. It’s a rather ambitious and appealing vision. You can read more about it here and here.
Jeremy goes on to say that Ayende is working on a LINQ to NHibernate. I’m a big proponent of NHibernate and I will most likely stick with it until the LINQ to Entities framework fleshes out a bit (I don’t see myself as an early adopter on Entity Framework at this point).
It’ll be awesome to have a strongly typed Query Object, but I think I’ve mentioned this before. Not 100% sure if I’ll be ready to give up externally mapped queries, but we shall see after some play and consideration.
Brian Dawson [MSFT] wrote:
David,
I was on the MS side of things during the discussions, and let me just tell you, the discussion was great. When we’re building software and you get a chance run into a group of people who get the vision, and also get some of the hurdles we have to jump; you really listen to the feedback. Thanks! Don’t let up.
-Brian
Posted on 21-Mar-07 at 10:35 am | Permalink
Dave wrote:
Yeah! I think it’s an incredible vision. One we’ve had to work toward by writing our own software. I’d much rather you guys write it! :)
There was a genuine feeling of “trying to understand” despite lots of passion coming from all angles. What made the event cool and a happening (for me) was that, while there was lots of talking going on, there was also an appropriate measure of listening. I think that’s the rare and special thing, especially when there’s emotional investments in a particular technology one is working with or working on (as the case may be).
Posted on 21-Mar-07 at 3:01 pm | Permalink