Jeremy D. Miller -- The Shade Tree Developer

Sponsors

The Lounge

Syndication

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
What Dan Simmons forgot to tell you about the Entity Framework

Dan Simmons from the Entity Framework team at Microsoft made a nice post comparing the Entity Framework to other existing tools.  I wanted to pick a little bone with his comparison to NHibernate.  I don't think he said anything inaccurate, and he was very fair minded, but he left out the crucial fact in any consideration of using NHibernate versus the Entity Framework.  The Entity Framework is very intrusive into your application, but NHibernate is not.  NHibernate lets me use POCO's to model the business process in a database agnostic way.  The Entity Framework wants me to bake EF infrastructure directly into my business objects.

The major problem I have with the Entity Framework is very apparent in Dan Simmon's post.  The EF team, and its advocates in the blogosphere, are strictly focused on data.  The last I checked, an application, system, or service usually consists of more than just getting data in and out of a database.  Some of that other stuff is quite challenging as well.  I'd prefer to be able to make that other stuff work in peace without data access infrastructure concerns bleeding into my business classes. 

I would really like to challenge the EF team and the EF cheerleaders to be more cognizant of the entire application architecture instead of focusing strictly on the grubby details of data access. 


Posted Mon, May 19 2008 4:02 PM by Jeremy D. Miller

[Advertisement]

Comments

DotNetKicks.com wrote Feedback on Danny Simmons' Why use Entity Framework
on Mon, May 19 2008 4:25 PM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Neil Mosafi wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Mon, May 19 2008 5:14 PM

Oh really?  That sucks hard!  I was under the impression that you could use any object for your entities if you want and the mapping layer would be separate (just like NHibernate or Linq2Sql).  I guess I was mistaken.

It also leaves a sour taste in my mouth to read that lots of new frameworks are going to be built which automatically take advantage of EF (such as Astoria)... why can't those frameworks just use POCOs and leave it up to the developer to plug in persistence providers of their choosing?  Strange decisions

Scott Bellware wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Mon, May 19 2008 7:10 PM

Why are we surprised that a team with a data focus has neglected to consider what the term "Entity" means in the business layer, or that the bounded contexts of data and business logic might have necessarily and advantageous differences in the definitions of terms in their dictionaries of terms?

The Entity Framework is more specifically the Data Entity Framework.  It's this distinction that shows clearly and directly that the EF team is out of its element in producing a framework for object oriented application development that makes use of a business data store.

"Entity" means something specific in a database, and is treated a specific way in that context.

"Entity" means something specific in an object-oriented program environment, and is treated a specific way in that context.

An EF "Entity" is an architectural travesty for not recognizing the difference in the contexts and the great advantages to building software with an awareness of the differences.

The EF team's persistence in refusing and recognize these basic application architectural issues raises questions of ethics for me.

In the end, the EF team operates under a safe harbor by shipping a framework that the EF hounds persist in calling an ORM, while simultaneously telling community leaders that the EF is not really an ORM in off-the-record conversations.

The EF team would be able to put themselves right back into the center line of ethics and responsibility to Microsoft customers and customer potential by stating clearly and for the record that the EF isn't really an ORM as they have said in private to insiders.

When we simply get back to seeing the EF as a pretty good query engine, we'll be able to use the tool to achieve the success that it's intended for rather than drag it into architecturally-irresponsible scenarios so as to justify the continued budgeting of the project by trumped up adoption predicated on misrepresentation.

The Inquisitive Coder » Blog Archive » Entity Framework stuff wrote The Inquisitive Coder » Blog Archive » Entity Framework stuff
on Mon, May 19 2008 7:48 PM

Pingback from  The Inquisitive Coder  » Blog Archive   » Entity Framework stuff

Tom Opgenorth wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Mon, May 19 2008 8:20 PM

I don't think the EF team and EF cheerleaders are the only ones guilty of this narrow focus on  data access.  

It seems that a lot places these days view the application as merely a portal through which to view the application.  Many of the contracts I work on have a mentality of "one screen - one stored proc" and treat the application as just a way to get the stuff from the database to browser (or WinForm app).  

Eric wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Mon, May 19 2008 8:24 PM

I like NHibernate but it is somewhat intrusive with respect to the need to make public props/methods virtual in order to do proxys for lazy load.  Certainly, not as severe as DAL inheritence but still annoying.

Dave Laribee wrote Entity Framework: Our Albatross
on Mon, May 19 2008 8:46 PM

Looks like another Entity Framework barfight! Hell, I'll join the fray started by Jeremy . I feel

Community Blogs wrote Entity Framework: Our Albatross
on Mon, May 19 2008 10:45 PM

Looks like another Entity Framework barfight! Hell, I'll join the fray started by Jeremy . I feel

Evan Hoff, Professional Code Junkie wrote On Comparing Current Tools to Futureware
on Tue, May 20 2008 12:55 AM

I'm going to take a quote from Daniel Simmons on why we should use the Entity Framework . I'm

Dew Drop - May 20, 2008 | Alvin Ashcraft's Morning Dew wrote Dew Drop - May 20, 2008 | Alvin Ashcraft's Morning Dew
on Tue, May 20 2008 12:31 PM

Pingback from  Dew Drop - May 20, 2008 | Alvin Ashcraft's Morning Dew

Patrik Löwendahl wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Tue, May 20 2008 1:43 PM

The question is this, does everybody understand the full strategy behind EDM? And would you rather have Typed DataSets as the Microsoft preferred application model of data?

The EDM and EF are separate things, the EDM is for creating models and the EF is the ORM. The architecture of EDM / EF is layered and separated in such a way that it is possible to build your own ORM above the EDM (or maybe create a NH dialect / provider).

I don't suggest that that's the first thing you should runaway and do, but this clearly shows that the intentions of the EDM is far broader then that of the EF.

A sum-up: www.lowendahl.net/showShout.aspx

5x1llz wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Wed, May 21 2008 9:34 PM

cosign the need for awareness of different ways to drive out your architecture....

I personally want to use POCO's and keep them free ( by any means necessary ) of any attributes, properties e.t.c. that are solely related to data persitance. This might work if there was a seperate suite of classes altogether just designated as DTO's.

I thought the whole idea of ORM was to simplify and support OOP principles instead of sending us forwards into the past.

Patrik, thanks for that succint distinction between EDM and EF. It seems EDM will be more useful than EF especially if it allows you to (easily) map to other non-EF ORM providers.

Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, C#, Entity Framework, WPF, Javascript | Code-Inside Blog wrote Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, C#, Entity Framework, WPF, Javascript | Code-Inside Blog
on Mon, May 26 2008 4:30 PM

Pingback from  Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, C#, Entity Framework, WPF, Javascript | Code-Inside Blog

Weekly Links: ASP.NET MVC, Silverlight 2, C#, Entity Framework, WPF, Javascript | Code-Inside Blog International wrote Weekly Links: ASP.NET MVC, Silverlight 2, C#, Entity Framework, WPF, Javascript | Code-Inside Blog International
on Mon, May 26 2008 4:31 PM

Pingback from  Weekly Links: ASP.NET MVC, Silverlight 2, C#, Entity Framework, WPF, Javascript | Code-Inside Blog International

Weekly Links: ASP.NET MVC, Silverlight 2, C#, Entity Framework … wrote Weekly Links: ASP.NET MVC, Silverlight 2, C#, Entity Framework …
on Mon, May 26 2008 6:46 PM

Pingback from  Weekly Links: ASP.NET MVC, Silverlight 2, C#, Entity Framework …

Entity Framework: Our Albatross | Developer Home wrote Entity Framework: Our Albatross | Developer Home
on Tue, May 27 2008 2:01 PM

Pingback from  Entity Framework: Our Albatross | Developer Home

Entity Framework: Our Albatross | Developer Home wrote Entity Framework: Our Albatross | Developer Home
on Tue, May 27 2008 2:01 PM

Pingback from  Entity Framework: Our Albatross | Developer Home

EF Long Term Plans | Developer Home wrote EF Long Term Plans | Developer Home
on Tue, May 27 2008 2:02 PM

Pingback from  EF Long Term Plans | Developer Home

EricTN wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Wed, May 28 2008 11:25 PM

You make a great point about there being only a database centric focus.  On the other hand, this is a 1.0 release.  Great feedback and commentary from people like you may have Microsoft broadening the focus and making things more elegant in future releases.  1.0 is 1.0.

Jeremy D. Miller wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Wed, May 28 2008 11:47 PM

@EricTN,

Man, I hate to be pessimistic, but the EF team has been getting this feedback for over a year with no announced plans to fix the problems.

罗爱军 wrote ADO.NET实体框架引发争论
on Thu, Oct 16 2008 2:29 AM
anon wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Tue, Dec 23 2008 4:08 PM

as someone who used to work on the .net team (and still remains friends) with many early .net team members, i think that the microsoft .net team has completely lost it's way.

damn near everything post 2.0 is a mess.

compare WPF to Adobe Flex/Air. WPF is a nightmare compared to the simple and easy to use Flex.

WCF is a configuration nightmare (which only eludes to the underlying overly-engineered, overly-complicated, ugly, architecture underneath). compare WCF to earlier incarnations.

WF is also a nightmare. look at the model for creating tracking services. it was literally designed backwards.

generics are awesome until you really get into the meat grinder with them and realize that the underlying subtleties weren't thought through at all.

the EF team is a joke. this reminds me a lot of the Patterns and Practices group, where they literally made up a bunch of patterns, told people that "everyone in the enterprise space is using them" and sold people into using them. subsequently, the team was gutted, and they're still trying to fix their reputation from it.

Sean wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Fri, Nov 13 2009 12:26 PM

I have been toying around with EF and EM now for a couple of weeks, and found if you design your system you don't need to connect EF into your business layer.  

Simple mapping from entity to DTO and most things seem to work fine.  I think the improvements in VS 2010 ( mainly in the designer )  really enhance certain aspects for the creation.

Had previous bad experience with NH, maybe the initial project wasn't set up correctly or the database but the fact it seemed to be disappearing into a black hole for the connection bothered me.

Tobias Manthey wrote re: What Dan Simmons forgot to tell you about the Entity Framework
on Tue, Jan 5 2010 11:21 AM

If you ask yourself how to get the data into *your* business (POCO) object, EF4 still gives you absolutey no answer. But much worse is the fact, that you can't even get the ORM objects in your structure. Look at what EF4 calls a "ComplexType" and find out that it is a pure scalar type.

All EF4 basically does is to give you an object representation of database tables with LINQ und changetracking support. End of story.

I cant see any OR*Mapping* in EF4.

See: social.msdn.microsoft.com/.../e0092fa1-46d5-4727-ab8c-faa61cac091e

Add a Comment

(required)  
(optional)
(required)  
Remember Me?