Strengths and Weaknesses of Mainstream design patterns for the Data Layer

Nuestro buen amigo Javier Caceres nos comparte su artículo:

Strengths and Weaknesses of Mainstream design patterns for the Data Layer

I would like to mention and outline brief definitions of mainstream design patterns for the data layer, to give some examples of them and see some of their strengths and weakness.

The Data Access Object -DAO-: this pattern was published by Sun Microsystems in 2007 (now Oracle) and although is framed into the J2EE patterns, it’s widely used in .Net/C# and other platforms. This is the Oracle’s definition: “The business component that relies on the DAO uses the simpler interface exposed by the DAO for its clients. The DAO completely hides the data source implementation details from its clients”.

The DAO biggest strength is considering multiple underlying persistence repositories, but there are two weaknesses in the DAO pattern: the first one is assuming than “each BusinessObject corresponds to a specific DAO” and the second one is implementing it as an interface to one table. Another implementation issue that it may appear it’s the unnecessary complexity of mixing it with the Abstract Factory or Factory Method pattern (because nowadays enterprise libraries handle the initialization). An implementation of this pattern can be found in the ObjectContext class.

clip_image001

Ver más aquí.
Saludos.

Fernando García Loera (Community Program Manager – Latin America Region)

Icono Ferglo 40x116twitter 40x40RSS 40x40facebook 40x116linkedin40x40xbox 40x40

Que es un MVP? / Tips para ser MVP