User Interface Process (UIP) Application Block - Version 2.0
Posted on 2004-08-22 11:15 1werwerfer 阅读(723) 评论(0) 编辑 收藏 举报Applications typically contain code to manage user interaction in the presentation layer; for example, one form can determine the next form that a user navigates to. Developers often write all of this code within the user interface (UI) code itself. However, if a developer includes navigation code in the user interface, the resulting code can be complex and very difficult to reuse, maintain, or extend. In addition, the application may be difficult to port to a different platform because the application control logic and state cannot be reused.
In many cases, applications contain state that must be maintained. If state is stored in a form, the code must access the form to retrieve state. This can be difficult to implement and tends to result in inelegant code, which again affects the extensibility and reusability of a user interface. For example, if, you develop several forms to be viewed sequentially, and then you need to insert a new form in the sequence, you must recode or modify both the previous and subsequent forms to incorporate the new form.
As a user interacts with an application, he or she may begin a task, put it on hold for a while, and then return to it. If the user closes the application between sessions, he or she may lose state and need to restart the entire task from the beginning. This is tedious for the user, and in some cases, it is unacceptable for your business logic.
Therefore, as you design your application, consider workflow, navigation, and interaction with business services and components as separate concerns from how data is acquired and presented to the user.
The User Interface Process (UIP) Application Block, version 2, provides an extensible framework to simplify the process of separating business logic code from the user interface. You can use the block to write complex user interface navigation and workflow processes that can be reused in multiple scenarios and extended as your application evolves. This guide describes the design and features of the UIP Application Block and demonstrates how you can use the block in your applications.
The UIP Application Block addresses a specific set of challenges that you will encounter in user interface development. These include:
- Navigation and workflow control — This should not be embedded in the user interface, but often is because the decision about which view to display next is based on business logic. This results in inelegant and unmanageable code.
- Navigation and workflow changes — Reformatting the layout of an application (changing the sequence of pages or adding new pages) is very difficult with traditional user interface techniques.
- State management — Passing state and maintaining consistency of state between views is difficult and is different for Windows-based applications and Web applications.
- Saving a snapshot of current interaction — You may want to capture a snapshot of an interaction and recreate it elsewhere, across time, machine, or logon boundaries.
http://msdn.microsoft.com/library/en-us/dnpag/html/uipab-ch01.asp?frame=true#uipab-ch01_topic3