A Rich Internet Application (RIA) Pattern
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.
Really?
by
Mark N
Every time someone misuses the DTO pattern or misidentifies it, a clown dies. You don't need a DTO to "send" objects, only to "receive" them only then if your plaform can only have one return type.
It seems they separate the "business" and "service" layer. Not sure what this gains you or even why.
Domain entities are only data? That is what DTOs are. When I retrieve objects in a list, I sometimes use a "SearchResult" or "ReportObject" but these are created at the "Data Mapper" level.
Educational Content
Building Hypermedia APIs with HTML
Jon Moore Jun 19, 2013
Deleting Code at Nokia
Tom Coupland Jun 19, 2013
Intro to CLP with core.logic
Ryan Senior Jun 18, 2013
Spock: A Highly Logical Way To Test
Howard Lewis Ship Jun 18, 2013
Java Garbage Collection Distilled
Martin Thompson Jun 17, 2013




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think