Thursday, April 17, 2008

Entity Framework Tutorial

Good introduction to the Entity Framework, by Julia Lerman (theDataFarm).

Another article, EDM: beyond the Basics seen on DataDeveloper.Net, by Matthieu Mezil.

And this introduction to EDM, by Michael Pizzo.

What strikes me with EF and EDM is that all examples are using the bottom-up approach (from the database schema to a business model). I suppose one can use other well-known approaches like Meet-In-the-Middle, but this probably requires manual changes in the EDMX files.

The generated classes are inheriting from technical classes in the framework (System.Data.Objects.DataClasses.EntityObject) which, IMHO, is not really clean. What is cool is the binding between the Entity and the Forms.

It will be interesting to see how Jasper (this project sounds promising) will hide the current "complexity" of the Entity Framework (see this blog entry from Julia about EF being complex). In this blog entry Julia writes:
I think one of the critical things I shared with them during the day was something that is also common to any LINQ queries, which is that you can very easily and unknowingly make trips to the database when you think you are just looking at only the cached objects.

EF developers can tune object graph loading (fetch plans, eager fetching) using specific APIs in their code (like Include()). Even if it what most ORM developers also do in Java there are better ways of doing this through dynamically configurable fetch plans, like in XIC.

No comments:

Post a Comment