
ike most DevX readers, anticipating change is an important part of my job. As a software developer and system architect, it is particularly important that I make sure our middle-tier objects can survive changes in the database-access layer. Although no software design can offer limitless flexibility, the design concepts of Separation of Concerns and Loose Couplingboth discovered during the prehistoric era of structured programmingmake designing resilient middle tier classes far easier.

Microsoft incorporates these concepts, along with .NET-specific best practices, in libraries called application blocks. Its Data Access Application Block (DAAB) is an excellent starting point for an examination of the practical advantages that Separation of Concerns and Loose Coupling provide. This article utilizes these two "mega-concepts" in developing an enhanced DAAB, enabling it to not only use a new open-source .NET data provider for the MySQL database engine but also C# delegates to build maximum flexibility into your business objects. In short, you get some practical source code to go with the theory.