BT

Rebooting Entity Framework

by Jonathan Allen on May 14, 2014 |

Entity Framework is being rebooted with an initiative called Entity Framework Everywhere. The goal of this project is dramatically reduce both the complexity of Entity Framework and the resources needed to run applications that use it. This will in turn allow it to run on a wider variety of platforms including Windows Store and Windows Phone.

The two primary challenges are summarized as:

  • The EF code base has a long history going back to the WinFS days. It makes extensive use of older APIs and design patterns. It would be very expensive to pull all of this forward onto modern platforms.
  • While using less resources is desirable on all platforms it becomes more prominent on devices as they typically have fewer resources than desktop and server machines. EF was not built with this in mind. In particular, memory usage was not a driving factor when EF was designed and implemented. The current resource usage of EF hinders its ability to be a good data access offering on devices. We’ve done some investigation on lowering resource usage and found it to require architectural changes that require a very large amount of work.

In regards to Cloud Computing, EF Project member RoMiller goes on to say, “EF currently uses a significant amount of resources, even for small models and simple data access. This doesn’t align well with a pay-per-play environment.”

Part of the simplification effort is the removal of underused features such as the ObjectContext API. The far more popular DbContext would be retained with little or no change to its API.

Some developers are understandably concerned about Microsoft supporting two code bases for EF. RoMiller writes,

This is definitely a valid concern. Although this light weight version of EF would still very much be EF, we aren't planning to pretend that it's exactly the same thing as the current types. We originally looked at refactoring the existing code base, but it's just not feasible to do given the complexity, design, and far-reaching impact of legacy/seldom-used features.

For developers that focus on one-to-one mappings between tables and classes the new direction EF is going in will be appreciated. But for those who think EF’s mapping capabilities are anemic, the news isn’t good. Those capabilities are going to be pushed further away from the core experience. RoMiller writes,

We will have a top level experience that ties all the core pieces together (i.e. unit of work pattern, change tracking, etc.) and then other things (like mapping to a relational database) will be extensions on this core.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Focus is important by Roopesh Shenoy

Why focus on so much reuse? I don't expect people to reuse code between a server app and a mobile app, so why not just have different tools that work well for mobile?

Trying to do everything for everyone seems like a recipe for mediocrity.

Focus is important by Roopesh Shenoy

Why focus on so much reuse? I don't expect people to reuse code between a server app and a mobile app, so why not just have different tools that work well for mobile?

Trying to do everything for everyone seems like a recipe for mediocrity.

Re: Focus is important by Jonathan Allen

To be fair, people who design or use ORMs are by and large ok with mediocrity. They aren't looking for the best solution, or even necessarily a good solution. They want something that will get the job done quickly, even if the end-user suffers.

And sometimes that is the right answer. Usually not in my opinion, but sometimes.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

3 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT