By Ben
User Interface Process (UIP) Application Block - Version 2.0
Environment: WinXP, SQL Server 2000 SP
3A
, .NET 1.1, UIP 2.0
Research ideas:
1. Understand familiar UIP and its architecture
2. Install UIP
3. Study Demo, understand the practical significance of UIP
4. Complete the HelloWorld program for the UIP application
5. Thus, consider summing up the availability of UIP in the actual project.
Overview
UIP is one of the Application Block, but it also uses the Data Access Application Block.
The purpose of UIP design is to implement some of our fixed UI logic management and control.
Realize more complex UI logic according to the MVC mode. That is, some logic's logic is put out in the business layer.
UIP architecture:
Some relevant noun explanations:
View
The closest to the system user is also a portion of the UI visible. UIP provides
WebformView,
WindowsformView,
WindowsformControlView from defines the view of our program. Equivalent to the MVC VIEW
UIP Configuration
Generally the settings of the Workflow and other interfaces or UIP settings
CONTROLLER
I feel the center of UIP, dominate the controller of the UI logic
Comparable to the Controller of MVC
State
As the name suggests, it is managing status, equivalent to MVC MODEL
Related Noun: Task
Installation
This block installer, DEMO's source code is open, you can Download on Microsoft Website
Download Installation Pack This Application's database and all source code, there are several DEMO source code
2. DEMO analysis
This study only focuses on studying the Store's Web Application instance.
This STORE workflow
VIEW setting definition
The view configuration of the above related pages is defined in web.config:
views>
TYP.NET page. This is here to see a limit of UIP: The page cannot be a parameter address. For example, the new record of our generally implemented record is the same page. With a class with action = Edit / The parameters of Add to distinguish the page is the implementation editor or add. Only two pages here are implemented. The above view is the webform for the base on uip WebFormView. What is the WebFormView implementation of UIP? Implement IView and Configure the current view of Controller (only the rough introduction here, there is no detailed study)
The purpose is to use the Controller implementation of interface logic for the following procedures.
It is worth mentioning that using the UIP to achieve workflow, the settings of the workflow are also in Web.Config
iViewManager = "WebFormViewManager" Name = "shopping" State = "state" StatePersist = "SQLSERVERPERSSTSTATE" Startview = "browsecatalog" CacheExpirationMode = "absolute" CacheExpirationInterval = "12:00:00"> node> node> node> node> node> NavigationGraph> Combined with the definition setting of View, this Boundary call Uipmanager.startnaVigationTask; "Shopping", TASK; // Interpret "Shopping": NavigationGRAPH identity name Name // task What is TASK is mainly to get CurrentTask (hereinafter mentioned), the current user interface State Controller: Reference Which UIP's Controller, Web.config also sets the location of this Controller: Name = "WebFormViewManager" TYPE = "Microsoft.ApplicationBlocks.uiprocess.WebFormviewManager, Microsoft.ApplicationBlocks.uiprocess, Version = 1.0.1 .0, Culture = neutral, PublickeyToken = NULL "/> ...... Name = "StoreControllernavgraph" TYPE = "UIProcessQuickStarts_Store.StoreControllernavgraph, UIProcessQuickStarts_Store.common, Version = 1.0.1 .0, Culture = neutral, PublickeyToken = NULL "/> Name = "SurveyController" Type = "UIProcessQuickStarts_Store.SurveyController, UIProcessQuickStarts_Store.common, Version = 1.0.1 .0, Culture = neutral, PublickeyToken = NULL "/> Name = "SQLServerPersistState" Type = "Microsoft.ApplicationBlocks.uiprocess.sqlserverPersistState, Microsoft.ApplicationBlocks.uiprocess, Version = 1.0.1 .0, Culture = neutral, PublickeyToken = NULL " Connectionstring = "Server = .; dataBase = uipState; user ID = uip; password = u1pr 0C 3ss "/> ObjectTypes> It can be guessed by UIP, which is our Base ON UIP's ControllerBase. It is the main focus of interface logic. It can be easily understood as Navigator using UIP, implements interface jump according to View's Configuration, see code: State.navigateValue = "storeform"; Navigate (); / / Interpret "Storeform": NavigationGraph defined NavigateGRAPH Navigation point to the logo of View // navigate (); to achieve Redirect. State (model): Mainly responsible for the management of user interface status. Use the Data Access Application Block to read saved in the database is the user interface status. Name = "SQLServerPersistState" Type = "Microsoft.ApplicationBlocks.uiprocess.sqlserverPersistState, Microsoft.ApplicationBlocks.uiprocess, Version = 1.0.1 .0, Culture = neutral, PublickeyToken = NULL " Connectionstring = "Server = .; dataBase = uipState; user ID = uip; password = u1pr 0C 3ss "/> Here, the interface status database is separated from the system application database. This user interface is saved in the session (as follows table), and will update to the status database set above. So here is using UIP to note that the use of session is. Session status Session button Types of value Taskmoniker43D 7C 64E-8BE1-4B0D-BC79 -442A 790173DE System.string NewsManagement: list: 43d 7C 64E-8BE1-4B0D-BC79 -442A 790173DE CurrentTask System.string 43D 7C 64E-8BE1-4B0D-BC79 -442A 790173DE From above: UIP is the characteristics of the interface according to MVC Based on the design idea of ASP.NET, it is mainly designed to work in Controller's work. Development application configuration The following is a process step in configuring the UIP for us to use vs.net development practices. 1. Establish a data structure (, please refer to the DEMO database after UIP installation) 2. Establishing Web Application Project The main reference is as follows a) Microsoft.ApplicationBlocks.UIProcess b) Common Layer Project 3. Establish Common Layer Project main reference: Microsoft.ApplicationBlocks.uiprocess 4. Add UIP Project. Add two Projects of the source code supplied after the UIP installation to Solution: Microsoft.ApplicationBlocks.Data, Microsoft.ApplicationBlocks.uiprocess 5. Set UIP Configuration, Web Application's Web.config a) Set configsections. b) Set UIPConfiguration. i. ObjectTypes.StatePersistenceProvider To set the database save location II. ObjectTypes.Controller is the Controller we have to be customized. Iii. Views is set to manage the page, and the page of the Controller IV. NavigationGRAPH mainly sets interface flows c) Set the session to ensure enable session 6. As mentioned in Point 3, add a class to the CommON Layer Project as a Controller definition. This Controller definition is mainly paying: a) (including constructor) To base on Microsoft.ApplicationBlocks.uiprocess.ControllerBase b) Method: According to the requirements, obtain the record ID of State c) Customize some Navigation logic 7. Define the Task class in CommON Layer Project, Template, please refer to Demo, the method name must be the same as Demo, because UIPManager uses these methods. 8. Establish other Projects required for projects (such as Business, DataAccess, etc.) This completes the configuration of the reference UIP to sum up: In fact, after research 1. I feel that UIP is to look at it. And to achieve the type of multi-state complex work with OA, using UIP will greatly improve our development efficiency and more maintenance work 2. And if you encounter similar: System page status management and maintenance, or to set up the page permission setting, you can also specifically study the STATE of UIP. And the general system application is free