Summary


This appendix serves as a review of the design concepts of the Data Mapping Application Block and the steps needed to configure and develop an application to use it. The primary design goal for the Data Mapping Application Block was to make it easier for architects and developers to incorporate best practices for leveraging data access logic components in their applications. One of the most tedious and time-intense tasks related to developing a data access logic component is the mapping of parameters in a relational database to the fields or properties of a business entity. The Data Mapping Application Block's design allows the information about these mappings to reside in configuration data instead of requiring that a developer write code. Additional configuration-driven properties exist for settings, transactions, the command timeout value, and caching information.

This appendix showed how to configure the various features in the Data Mapping Application Block and demonstrated how the code that is needed to perform data mappings and execute database operations can be minimized by taking advantage of this configuration data. Specifically, it focused on how the name and parameters for a stored procedure can be completely driven by configuration, thereby decoupling an application from those stored procedures. It showed how to map data values that are not known until runtime into a stored procedure's parameters.

The appendix demonstrated how to configure and develop a data access logic component so that data can be cached and database operations can occur in the scope of a transaction. By making many of these decisions solvable through configuration, an application can not only be developed more expediently, but it can also be more isolated from changes that may occur in an enterprise's environment. For example, if a stored procedure's parameters change or a completely different stored procedures needs to be executed for a particular database operation, the likelihood that any code in the application will need to change is reduced by using the Data Mapping Application Block.




Fenster Effective Use of Microsoft Enterprise Library(c) Building Blocks for Creating Enterprise Applications and Services 2006
Effective Use of Microsoft Enterprise Library: Building Blocks for Creating Enterprise Applications and Services
ISBN: 0321334213
EAN: 2147483647
Year: 2004
Pages: 103
Authors: Len Fenster

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net