"No Confidence Vote on EF" et al.
The Entity Framework “No Confidence Vote” is a couple of days old now. I wanted to give the Internet a couple of days to chew it over and figure out where it really fit into the big picture. If you follow me on Twitter you may have seen some back and forth between Scott Belware and I recently. Most of this back and forth has been about his attacks of the Microsoft community (attacks of the technology or even the company are fair game as far as I am concerned). Getting personal by accusing me, the Microsoft community or even individual EF Team member’s directly seems petty and unnecessary.
In that same light, some of the ALT.NET community (I won’t name names) have accused me of being a shill for Microsoft’s techologies. Anyone who has ever seen me talk about any Microsoft technology already knows that I pride myself in my centrist view of any technology (Microsoft’s or others).
For me the power of the Entity Framework is *not* in its use as a ORM. There are dozens if not hundreds of ORMs out there. Depending on your specific use case, some are great…some are less than great. None is a perfect ORM for every case. My attitude about the Entity Framework is that it isn’t a great ORM…but that it isn’t trying to be. The power of the Entity Framework is in a common language for communicating a model. The Entity Data Model can handle complex scenarios. The big advantage in using the Entity Framework comes when the Entity Data Model is used by Microsoft and external projects. The effort required in building a real model of existing enterprise data is not trivial. The labor involved can only be recouped if the model is useful in other scenarios as a model of your data throughout your organization. That’s not the case yet. Microsoft isn’t there. In addition, the Entity Framework is not a good tool for the top-down development that Domain Driven Design and Model Driven Design are espousing. Again, I don’t think that was ever their intention. But its important to know. There are other criticisms of the technology to me made but that’s not the purpose of this post. Instead its to say that its a great start on a long-term strategy and for many people now isn’t yet the time to use the Entity Framework.
But that being said, what is my opinion the No Confidence Vote? I don’t think the technology should be killed. I think its a great start but still flawed as many v1 technologies are. My chief complaint with the whole movement in trying to kill the Entity Framework is the tone of the message. Angry bitter attacks on Microsoft and the Microsoft community do not help create dialog. It just creates division and a dug-in mentality. My experience is that if you attack a side, they are unlikely to change their minds but instead will just becoming more resistence to listening. Maybe that’s the point. If you create an environment where Microsoft fails, then maybe nHibernate will get more traction.
So what do I think of nHibernate specifically (as it is the elephant in the living room that no one wants to mention)? Its a great framework. Period. I use it and have used and recommended it with past clients. I will continue to recommend it (and actually recommended it as well as other ORM’s in a recent user group talk in defference to the Entity Framework in the v1 timeframe). So why do I care about the Entity Framework if I like nHibernate? Because they meet different goals. nHibernate is a persistence framework (or a ORM if you prefer). But it doesn’t attempt or do a very good job of sharing its model across non-code environments (reporting, BI, etc.) And it shouldn’t. Its not its job.
If I had one complaint with nHibernate it is in the realm of tooling. CodeSmith and MyGeneration templates are fine but they typically only do a object-to-table mapping. Everything else requries that you hand-code the XML. I think nHibernate design tools is where much of the effort for the project should be focused. That’s why so many Microsoft developers have latched onto LINQ for SQL and Entity Framework. Its confortable for them to build models visually.
One last note, of the personal attacks I wanted to point out one person who is taking way too much shrapnel: Julia Lerman. I’ve known Julia for a number of years and I think she is exceptionally talented and very well intentioned. Picking on her because of her visibility in the Entity Framework is shameful. I have never known her to not talk about the warts as well as the benefits and I expect her forthcoming book will do the same. The real shame of this personal attack is that after many years in the community, she has taken on her first book. Writing your first book is a particularly vulnerable time for anyone. Having to weather the hostility towards the Entity Framework when she is just writing about the technology, not taking ownership in its authorship is a tough thing to do. I expect she’ll come out the other side fine but it doesn’t seem fair to deal with both at the same time.