BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Rebooting Entity Framework

Rebooting Entity Framework

Bookmarks

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.

Rate this Article

Adoption
Style

BT