applications, or larger applications that contain business rules, consider using a layered
design that separates presentation, business, and data-access functionality into separate
layers. In addition, the interaction between the presentation and business layers should be
message-based, which is better suited to the stateless nature of Web application requests.
On the client, you can improve the user experience by using dynamic HTML (DHTML),
JavaScript, Asynchronous JavaScript and XML (AJAX), or a combination of all three
technologies. For example, with AJAX you can implement lazy loading and partial updates to
page content, which will improve performance and prevent the “reload flash” when a user
interacts with the page.
For more information, see Chapter 15, “Web Applications.”
• How to design a rich client application
For reusability and testability, separate the presentation logic from the UI implementation
by using a design patterns such as Model-View-Controller (MVC). Design to provide a
suitable and usable interface in terms of layout, navigation, choice of controls, and
localization. Extract business rules and other tasks not related to the UI into a separate
business layer. Use a message-based interface to communicate with services deployed on
separate physical tiers. Avoid tight coupling to objects in other layers by using common
interface definitions, abstract base classes, or message-based communication. For example,
implementing the Dependency Injection and Inversion of Control patterns can provide a
shared abstraction between layers.
For more information, see Chapter 17, “Rich Client Applications.”
• How to design a rich Internet application (RIA)
Plan to use a Web-based infrastructure, because RIA implementations require an
infrastructure similar to that of Web applications. Design your application to run in the
browser sandbox. When designing an RIA, consider using a single page that changes
dynamically as the user works with the application. Multi-page designs are more complex in
an RIA, and require additional considerations such as deep linking and UI screen navigation.
Design for usability, such as the ability to pause and navigate to the appropriate point in a
workflow without restarting the whole process. RIA implementations have a small footprint
on the client, but require a browser plug-in. Design for scenarios in which the browser plug-
in is not already installed, including non-interruptive plug-in installation and displaying
informative error messages if an installation problem should occur.
For more information, see Chapter 16, “Rich Internet Applications.”
• How to design a service
When designing a service, there are general guidelines that should be followed; for
example, design for extensibility, use coarse-grained interfaces, never assume how the
client will use the service, and decouple the interface from the implementation. The best
way to support these guidelines is to introduce a service layer in your design that sits
Application Architecture Guide 2.0a
Microsoft patterns & practices