Microsoft’s patterns&practices has published a RIA pattern under the Application Architecture Guide 2.0 project. The pattern addresses a 3-tier scenario providing a solution for it.
The scenario considers a RIA accessing a database without transferring any sensitive data by using a 3-tier design:
The proposed solution is:
The solution makes use of the following patterns:
- User interface processing is handled by a Model-View-Controller pattern.
- The user interface is composed of multiple controls, with some that can be bound to data elements.
- A proxy is used to communicate between the presentation layer and service layer
- The Data Transfer Object (DTO) pattern is used to package multiple data structures into one.
- The service layer provides translation between internal and external data structures.
- The business layer uses a façade pattern to support coarse-grained message-based operations.
- Transaction Script objects are used to handle business request processing.
- A Repository pattern is used to access domain entities.
- A Domain Entity pattern is used to define business entities that contain data only.
- A Data Mapper pattern is used to map domain entities to the database schema.
The guide explains in detail each pattern used and offers a technical solution which is, of course, based on Microsoft’s products. The respective solution can be nonetheless used with different products including open source ones.