Framework Madness!

And other adventures C# and … Entity Framework/Data Services – First Impressions

leave a comment »

Sorry, I have been away for a while. Been sick and busy, a frustrating combination. But … I digress. I have started to use Entity Framework/Data Services on a project I am working on. So far it has been a very mixed experience.

Thus far I have really enjoyed working with the EDM in general and with the Data Services managing data thru n-tier is actually. Seriously easy. All you need to do is create a database, map it with a .edmx file, wire it up to an data service, create a client of some kind away you go. At a modest pace you can do that in about 15 minutes. Of course, this is the most simple scenario and would fit the security concerns of a deployment scenario. The end result is an experience that is vastly superior to using DataSets or trying to move objects between tiers, mainly because of LINQ.

What is been the largest pain point has been .edmx and the designer, especially in light of what the Ado.Net team demoed at the 2008 PDC. The Entity Framework Futures session demonstrated coming functionality (hopefully) that would all one to map POCO objects straight to an ObjectContext sans xml mapping file (.edmx) using attributes.  This would be so much easier than having to use .edmx and its verbose mapping scheme. How enjoyable the experience would be if you could just declare an ObjectQuery property in a custom ObjectContext and  use attributes for table and association mapping. It wouldn’t be as fancy, but it should would be direct and I think less cumbersome than current requirement of an .edmx mapping file.   I understand the necessity of .edmx in certain situations, but I wonder how much time the team could have saved if they would punted an XML representation down the road .Net 4.0. They could have had much more time to develop a good designer and perhaps used XAML 2009 for their representation. Working with the designer is tragic and reminds me of designing typed datasets in .net 1.0 Right now I find I often have to close/open a solution because sometimes the designer refuses to open, and then when working in the Designer the experience is buggy or incomplete. For example, when you set an association between entities the designer doesn’t clean up and leaves you to deal with a cryptic error. That’s just one example, there are more.

So what’s the conclusion? I wouldn’t go back to dataset or rolling my own object because the combination of Entity Framework/Data Services brings too much to the table. I would rather work around the current short comings as they prepare for their next release because this combination of tech going forward brings too much value and ultimately save too much time to be ignored. But right now I would say this is clearly a leading edge and requires a good amount of “homework” to get right. Venture at your own risk, but so far I think it’s worth it.


Written by Lynn Eriksen

February 11, 2009 at 5:47 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: