Archive

Posts Tagged ‘Entity Framework’

Microsoft’s Entity Framework


I have been wrestling with programming patterns that bring data to the UI, and I am looking at three ways to do it:

  • the hand rolled datalayer
  • LINQ
  • Entity framework

In this series of posts, I’ll share lessons learned and bits and pieces of how to make things work, like the best way to use stored procedures in LINQ and so forth.

I also have a really great book to recommend.  It’s “Programming Entity Framework” by Julia Lerman.  This is a really great book.  She takes you through a very complex and feature rich subject.  The only nit I have to pick with this book is that many of the examples are wrong.  If you follow instructions, your stuff will break.  This is very unfortunate because at the earliest stages of the learning process, one never knows why something truly went wrong, or if you are learning something the wrong way.

I wish publishing companies would just print a few copies of the book and either give it to people or simply pay them to walk through all of the exersizes in the book and catch what is wrong.

Basically, it’s a nit and well worth the price of admission to this subject.

How we move data around is really important, and frameworks and design patterns help us.  The Entity Framework is a very important framework and design pattern to learn.  Microsoft has put a lot of money into it, and this framework has won the internal battle.  The LINQ team has been merged into the Entity Framework team and LINQ is basically going to tread water and quietly go away.

There is a lot to be said for the ability to look at a programming problem from a domain perspective.  I can’t tell you the number of times I have had to redirect high level design sessions away from the physical database into requirements and business rules.  One of the benefits of the Entity Framework is the way it influences design conversations. 

Dr. Peter Chen has written extensively about the structure of design elements feeding back into language and vice versa.  Here are links to a few of his papers:

  1. The entity-relationship model: Toward a unified view of data
  2. Entity-Relationship Modeling: Historical Events, Future Trends, and lessons Learned
  3. From Ancient Egyptian Language to Future Conceptual Modeling
  4. English Sentenence Structure and Entity-Relationship Diagrams
  5. The entity-relationship model – A basis for the enterprise view of data
  6. English, Chinese and ER Diagrams
  7. A Preliminary Framework for Entity-Relationship Models