Julie Lerman's DevLife

DevLife Part I [May 2005 - March 2007]

My Links

Blog Stats

News

A blog for DevSource.com.

This blog was originally part of the blogs.ziffdavis.com site from May 2005 through June 2007 when the blog was moved to the Movable Type blog engine and hosted at blog.devsource.com/devlife.
The original blog was eventually shut down and I was given the posts so that I could host them on my own site.


Archives

Friday, March 16, 2007 #

Entity Framework testers are starting to get below the easy, surface-level stuff

An interesting thing is happening in the ADO.NET Orcas forums. The hard questions are really starting to come out. People have been playing with Northwind and getting familiar with the basics of EF long enough and have begun testing their own data access and modeling needs and theories against it.

The ADO.NET team has been right there answering questions and engaging in some interesting conversations as well as followgin up with some blog posts.

Some very interesting recent topics have been:

Stored Procedures: Theres a post in the ado.net blog abot how to implement sprocs in the EF. While this is great to have (and necessary because it's not very discoverable and the documentation doesn't exist yet in the MSDN docs that came with the new CTP),  John Papa points out one toughie with the methodology. There's a database level tweak required to sprocs that you want to implement in the framework. John also cleverly refers to this functionality as “CUD” because it's for change processing, but not Reading. Living in a state where there are a lot of cows, I thought CUD was pretty funny.

Persistence Ignorance: Okay, this is another one of those “comp sci major” terms. (Remember, I was a history major.) Again, a fabulous discussion in the forums.  The question was in two parts - first was the necessity to subclass the entity framework classes rather than just inherit from them. According to Danny Simmons from Microsoft, they are currently working on changing this and we should see a new twist in a future CTP. The second was about the current requirement of attributes to define entities at the class level. Danny addresses this as well. Great converastion here.

Inheritance in the EF: It is possible to inherit from entities. Erick Thompson explains and demonstrates inheritence in this blog post. While much of the focus of the conceptual layer is about not touching the db, Erick demonstrates how the Entity Framework's flexibility can handle when the database changes.

Realizing the Conceptual model by flattening data: While the EF can map an entity across two tables, it can currently only do so when the tables have a one to one relationship. What if you want to flatten data? This is the question posed in this forum thread. If we have data availabel in a child object ((eg Product.Productname and Producut.Categories.CategoryName) and want it to be a property of the parent object so you would end up with Product.ProductName and Product.CategoryName, how can you achieve this in the Conceptual layer without mucking with the database (eg creating a view). The answer is that right now you can't. But a number of folks on the team weighed in and again, it was very educational for me.

New ideas bubbling up.

Map a DataSet Schema to an Entity Schema: Earlier this week, I did a presentation on EF at the TechValley.NET in Albany, NY. There was a smart bunch of programmers who challenged me with some quetsions I just couldn't' answer. One of them was Griffith Townsend who asked about doing this. Rather than theorize, I suggested that he post the question in the forums, which he did. I look forward to seeing how this conversation goes.

Extending the CodeGen capabilites of EF: This was a secondary question in this thread. More interesting reading.

NEW SAMPLES!! The Linq to Entities samples (C# only still) were added to the 101 Linq samples download. Get it here. I built a cool little CRUD demo for my Albany presentation that uses LINQ to Entities. I'm thinking about doing a Camtasia video of it.

Roger Jennings continues to do some great analysis of many of the above issues educating me (and many others, I'm sure) with his broad perspective.

posted @ 5:08 PM