Monday, March 29, 2010

EntityFramework in Action: Great book, but the concerns remain

mostarda_cover150.jpg I did a review for Manning for the upcoming title "Microsoft Entity Framework in Action".

This is a thorough book about the EntityFramework v4. It not only discusses the EntityFramework but also gives some guidelines how to build applications with it. The book is written in a clear and well organized style that makes it an easy and enjoyable read.
What I liked in particular is the fact that the author is objective and also critical and does not blindly promote the EntityFramework as a silver bullet.

I can fully recommend this book to developers and architects that want to use the EF in a project or just want to learn more about the EF in order to be able to evaluate it.

The first chapter is probably the best introduction to the topic of object-relational mapping I have read so far.
Another highlight of the book are the chapters about Linq, which are also also valuable outside of the context of the EF.

But after reading the available chapters, I still have my reservations about the EntityFramework itself.
The book is very objective and does not hide the problems that still exist with the EntityFramework. The author also sometimes states his critical opinion about certain characteristics of the EntityFramework. I like this very much (better than hiding or ignoring the problems), but in the big picture this leads me to suggest for everybody to evaluate other ORMs before deciding for the EF.

Some critics have been addressed since the "Vote of no Confidence", but some still remain.
Here the main issues I still have with the EntityFramework after reading the book:

  • The tool-focused way of the mapping (using the designer is almost a must).
  • The "model first Approach" is still not really very smooth compared to other ORMs.
  • POCO support comes not out of the box, probably because of legacy support for EFv1. If you use the provided code-generation templates, the generated entities are not POCOs. You actually have to download special templates to have the EF generate real POCO entities.
  • The mapping mechanisms of the EF are overly complex, and I don't see the benefits over other ORMs (concepts like EntitySets and foreign-key vs. independent associations are just two examples that are not present in other ORMs (e.g.JPA), while I think those other ORMs have proven to be fully capable of solving the problem).
  • The verbose and redundant xml-mapping files (.csdl, .ssdl, .msl) remind me heavily of the J2EE days from about 5 years ago. As in J2EE 5 years ago, tooling is the proposed solution for accidental complexity. In the Java world of today this heavyweight J2EE approach is generally accepted as a failure.
  • Some mapping artifacts (.edmx, .ssdl, .msl) are still too big and monolithic, making them not suitable for source-control and team environments.

  • No comments:

    Post a Comment

    Related Posts Plugin for WordPress, Blogger...