Entity Framework: Our Albatross

Looks like another Entity Framework barfight! Hell, I’ll join the fray started by Jeremy. I feel compelled given that I’m part of the NHibernate Mafia.

Ah! Well a-day! What evil looks
Had I from old and young!
Instead of the cross, the Albatross
About my neck was hung.

The Entity Framework is the Albatross of ALT.NET. We’re forever doomed in podcasts (two I’ve been on have devolved into this rat hole), blogs, and twitter to have to rail against the machine that is the EF. Let’s work toward an elevator pitch, explain why we won’t use it, don’t believe it will work, and get the hell on with our lives.

I remember being in Redmond at the original meeting. Yes it’s true that this is the genesis of all this ALT.NET business, but come on! There’s more to it than NHibernate vs. EF, but we keep coming back to this same, tired subject.

I made an observation that EF (back then “LINQ to Entities”) isn’t an ORM way, way back:

…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.

Ah… the youthful exuberance of past me (March, 2007). Clearly this is very initial analysis on a beta of a beta of a beta, which is to say: not very deep. I’ll admit it. But there’s an initial flame of recognition in there.

An ORM can’t be a mere facility to a “data platform.” Platforms are old school, we’re buckling under the weight of cumbersome frameworks and the myriad scaffolding needed to get an app running on a platform. The Java folks are headed toward MicroKernel architectures and we see this evolution starting in the lightweight containers that tend to germinate as IoC tools. Pick your flavor. So now we’re talking platform?! Why on earth would we start with bloat?

Furthermore and perhaps more immediately, Jimmy Bogard hits the bell with a sledge hammer:

I think it’s a mistake to share a data model with anyone outside your bounded context (see Evans, Domain-Driven Design). It’s also a mistake to share a conceptual model or a EDM or whatever we’re calling this.

This is an enterprise architect’s vision. All that time enterprise architects are thinking about the single platform to rule them all, well they should consider more how their production lines (e.g. teams in a lean sense) are organized and how to achieve flow, pull, leveling, etc.

Silver bullets are, in fact, an illusion. We learned this long ago. Let’s refresh our memories and move on.


This entry was posted in ALT.NET, Entity Framework, opinion. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

4 Responses to Entity Framework: Our Albatross

  1. Dave Laribee says:

    @Liam – That’s where I was trying to point (No Silver Bullet). Thanks for the heads up and it’s fixed!

  2. Greg says:

    Trackbacks apparently not working so I put one manually

  3. Alan Stevens says:

    Well said, my friend. You should rant more often. 😉


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>