|
Article relates to
|
Telerik OpenAccess ORM
|
|
Created by
|
Alexander Filipov
|
|
Last modified
|
June 24, 2009
|
|
Last modified by
|
Alexander Filipov
|
DESCRIPTION
The goal of this article is to provide initial steps to follow when designing multi-tier applications with Telerik OpenAccess ORM.
SOLUTION
When designing complex applications the best approach is to use Telerik OpenAccess ORM only in the low-level layers for data access. The data access tier itself can be split to two projects. One of them is the Data model containing Persistent classes. They can be either forward or reverse mapped to a database. The other project is the Business logic that operates on the persistent model and provides data to the upper tiers. This data can be wrapped in additional middle-tier business objects to isolate the OpenAccess specific persistent objects from the rest of the application. These business objects should not depend on the data access layer and can be used as transport objects all the way through to the Presentation layer. It is a good practice to use an interface to define the functionality required from the Business logic. This will make relatively easy to replace the BLL and DAL with another data provider that implements the interface, without changing the upper layers.
The application related to this article demonstrates how to design and implement such a flexible data access tier that can be either used initially or integrated into an existing project. The workflow of the application is illustrated on the diagram below.
- The Presentation layer requests objects from the BLL of the data provider;
- The Business logic layer executes the relevant query;
- The Data access layer retrieves persistent objects from the Database and returns them to the BLL;
- The Business logic uses a set of Assembler classes to wrap the persistent object data into business objects and sends them to the next layer.
For more detailed information about the implementation, please take a look at the source code. The sample project is available for download from our
Code library.
Please
Sign In
to rate this article.