User Interface Integration Example
The shell developer can define a general layout to host user interface elements.The mechanism of communication between the discrete parts of an application and the shell is through the root WorkItem.
Every Composite UI Application Block application contains a root WorkItem. The root WorkItem is a container for components that are shared across the application.
UI extension site is a Composite UI Application Block user interface element that is designed to be extended by different components in an application. eg. MenuStrip, StatusStrip.
We can customise an application using solution profiles in a catalog. A solution profile is a list of modules that should be loaded into an application. When the application starts up, the Composite UI Application Block reads the catalog and loads the specified modules.
After a module is loaded, it can add elements to the shell's UI Extension Sites. For example, a module can add menu items to the shell's MenuStrip to expose the module's features. If the entry for that module is removed from the catalog, the module will not be loaded when the application starts. The application will continue to function, but the menu items for that module will not appear.
Modules can also contain visual representations of data, such as a control, a Windows Form, or a wizard page. These visual representations are referred to as views or SmartParts.
The WorkItem supports the MVC pattern through the following:
- Model. This is represented by a WorkItem state.
- View. WorkItems may contain one or more views.
- Controller. Each view has associated controllers that expose object interfaces for tightly bound interactions and loosely coupled interfaces in the form of commands, events, and subscriptions.
- A consistent way of showing and hiding SmartParts (controls) using Workspaces. A shell developer can consistently introduce visual effects, layout strategies, or other behaviors without affecting the business logic components.
- A common way of adding and using UIElements into the shell, such as menu items, status bars, so that the developer of an individual piece of business logic does not need to know how or where that element will be shown.
- A Command architecture that allows a business logic developer to separately define actions a user can take and how they are displayed in a specific shell.
No comments:
Post a Comment