Database Access Framework

There are multiple schools of thought on Data Access Layer design. The frequently used models are – (a) Entity or Query Modeling, or (b) Object Relational Modeling. Both these approaches have their own pros and cons and these are beyond the scope of this manual. It should suffice to know that this is a critical question that an application design should answer.


A typical byproduct of the design choice of the Data Access Layer permeates through the Business Logic in the form of the interaction pattern imposed by the Data Access Layer present in all places where the Business Logic layer tries to interact with the database. This again is not a decision that changes during the course of application design, but from a development platform perspective, this provides the need for an abstraction on supporting multiple models of Data Access Layer without having the same interweave with the Business Layer.


This brings about the need for the Database Access Framework (DAF) provided by Canvas Technology. The key philosophy behind the DAF is to provide a simple and consistent means for interaction with the Data Access Layer chosen for the end application and provides a standard means for developer to work with data (any kind of DML).


Canvas Technology provides the default support for iBATIS which is a persistence layer framework that works on the concept of query based abstraction and an XML based modeling of the DML. While this is a key aspect for the platform itself, this is not imposed on the end applications! It is a different matter that the only adapter that Canvas Technology comes bundled with is for iBATIS, but nothing stops the end application to add an adapter for any other Data Access Layer or framework (like Hibernate, etc.) based on their needs. Refer to the Advanced section of this tutorial to identify how you can create your own custom implementation of the Data Access Manager provided by DAF.

Database Access Framework uses the concept of Logical Data Sources and Data Access Layer usage towards these Logical Data Sources. This is an important concept to understand for getting the optimal benefits of this framework.

View the following pages