Describes how to separate the responsibilities of components in the presentation layers by using common design patterns.
Benefits of Using Design Patterns
Most computing problems you will encounter in business applications have already been confronted and solved by someone, somewhere. Design patterns and reusable frameworks based on these solutions help you to overcome the complexity that exists in large applications. The following is a brief summary of the benefits of design patterns and reusable components:
Design patterns?Design patterns provide access to proven methodologies for solving general problems and the ability to use the collective knowledge and experience of the IT community to improve the quality of your own applications. You can use patterns to help you organize code in proven ways to solve well-understood problems.
There are many proven design patterns that help you solve problems relevant to the presentation layers. Choosing the correct patterns leads to more maintainable code that separates unrelated tasks and functionality. Using these patterns leads to better modularity, higher cohesion, and lower coupling in your application; these are essential characteristics of well-designed systems. The design patterns described in this chapter apply to both Windows Forms-based user interfaces and ASP.NET Web pages.
Reusable components?Reusable components encapsulate functionality that is common across many applications and increase productivity when building your own components following a certain set of design patterns.
The Microsoft User Interface Process Application Block is a reusable component that helps you build user interfaces based on the Model-View-Controller (MVC) and Application Controller patterns. This block simplifies navigation between related pages or forms in the user interface, and it also lets you take a snapshot of the current state in the application so the user can resume the application at the same stage later. Additionally, the block enables you to get a clean separation between the code that handles user interactions and renders the user interface and the code that performs ancillary tasks; this approach allows you to use the same programming model for Windows Forms applications, Web Forms applications, and mobile applications.