Thursday, June 26, 2008

Ian Cooper Rings in with a Level-Headed Critique of Entity Framework v1

Ian’s The criticism of the Entity Framework is not just around Domain Driven Design post of June 26, 2008 likens Entity Framework v1 to early versions of Enterprise Java Beans (EJB):

EJBs were an ambitious attempt to support persistence, transactions, events, [remote procedure calls (RPC)], etc., in a single component. While there was an initial rush to adoption, they quickly proved a millstone around the Java communities neck, because of their complexity. Technologies like Spring and Hibernate emerged as less-complex ways of delivering enterprise class solutions, many of them were later to be incorporated into drastically revised EJB visions.

The .NET community had a huge amount to gain from this experience. Ports of Hibernate and Spring offered the community the chance to avoid the mistakes of the past. However, seemingly unaware of the lessons of history the EF team embarked on a project to produce a complex framework, of which persistence is just one aspect, reminiscent of the EJB initiative. So the reaction against the EF comes from its failure to learn lessons that another community has struggled with around complexity and ambition.

So the warnings issued around the EF are trying to prevent .NET developers straying into the same path of pain that their Java brethren experienced with complex non-PI frameworks.

He concludes with an analysis of why domain-driven design is preferable to data-driven architectures.

Backstory: Ian Cooper was one of LINQ to SQL early proponents and Entity Framework detractors. Ian wrote the first analysis of the architectural patterns supported by LINQ to SQL in his Being Ignorant with LINQ to SQL post of June 10, 2007 which concluded:

LINQ to SQL is usable with a TDD/DDD approach to development. Indeed the ability to swap between LINQ to Objects and LINQ to SQL promises to make much more of the code easily testable via unit tests than before.

His post garnered 122 comments.

My Ian Cooper Takes on DDD, TDD and PI with LINQ to SQL post of June 11, 2007 is a lengthy review of his analysis and includes a link to Ian’s earlier critique of EF, LINQ to Entities and Occam's Razor.

My post includes a link to Defining the Direction of LINQ to Entities/EDM post of May 29, 2007, which includes a lengthy comment on my recommendations by ADO.NET Architect Michael Pizzo.

Note: If you’re working with LINQ to SQL, Ian has written an eight-part tutorial entitled Architecting LINQ to SQL Applications. This, alone, should prove Ian’s not an architectural bigot.

Update 6/26/2008 1610 PDT: Added “Ian Cooper was one of LINQ to SQL early proponents and Entity Framework detractors” sentence from linking entry for clarification.

0 comments: