I thought I'd post this summary that I sent out to our internal developer list earlier today.
UPDATE: Tim posted his views on the EF and the open letter here.
There have been a lot of complaints about the current implementation of the Entity Framework in the community and a bunch of the more visible alt.net figures have put together an open letter detailing what they see as its faults.
The purpose of this open letter is supposedly not to torpedo it, but to make Microsoft address these issues in the future. I’m far from an expert in this but on a quick read-through, their complaints seem to be:
- The design of the framework entities is that they are data only, causing issues in maintainability and making it difficult or impossible to implement business objects or more “real-world” objects.
- The design of the framework entities is that they cannot be persistence ignorant, so things like unit testing become next to impossible because you cannot test the model without the database (for instance).
- Lazy loading is not supported at all and requires a lot of extra code to make work. This confuses me. I thought I saw "lazy-loading" demoed internally but I might be mistaken.
- Shared, canonical models contradict software best practices. This appears to be related to using a single shared model for multiple contexts in the EF, rather than multiple models, one for each individual context. I’ll be honest, I don’t much about this other than what I read in the explanation.
- Excessive merge conflicts with source control. Apparently, since the diagram contains the model and the visualization, it causes tons of merge conflicts when a team is using it.
Just thought I’d pass this on. It’s interesting from at least a best practices point of view.