Composite UI Application Block Curriculum

A Four-Day Class

Requires Microsoft Visual Studio 2005

1. Introduction

Problem background. Need for and benefits of smart client applications in a distributed system. Requirements of users, architects, programmers, and administrators. Need for composite applications and loose coupling.  CAB as a solution to these problems. Parts of a CAB application, definition of terms, comparison to OLE. Organization of CAB code and build environment.   Examination of simplest sample application.. Tracing and using the Visualizer to debug CAB applications.

 2. Application Shell and Services 

Concepts and definitions. Generating a shell project with Visual Studio templates. Base classes used for the shell, commonly overridden methods. Use of the ProfileCatalog.xml file. Detailed walkthrough of shell startup, examination of each item. Concept of a service; examination of the service model used in CAB. Loading and starting services explicitly and in response to marked dependencies. Examination of the prefabricated services that come with CAB. Example of writing our own service. Customizing application behavior by replacing the standard ModuleEnumerator service with one that gets the list of modules from a web service instead of a local file.

3. Work Items and Controllers

Concept of a WorkItem -- a container for a set of components working together to accomplish a specific task or use case, sort of like a mini-application.   Base classes used for work items. Initializing WorkItems in the OnRunStarted method. Activating and deactivating WorkItems.  Concept of the Controller class as the location for an application's behavior, description of the ControlledWorkItem class.

4. Smart Client Software Factory

Need for a higher level of abstraction and pre-fabrication for CAB. Smart Client Software Factory download as a solution to these problems. Examination of a project generated by SC-SF. Examination of tools included in SC-SF. Discussion of classes generated by SC-SF.

5. Workspaces and SmartParts

Concept of a workspace. Examination of the IWorkspace interface. Types of workspaces: tab, deck, zone, window, and MDI. Creating workspaces with designer and programmatically. Communicating workspaces to the work items which will use them. Concept of a smart part. Constructing smart parts from user controls. Containing smart parts in other smart parts, through the toolbox and through use of the SmartPartPlaceholder control. Showing and hiding smart parts.  Using Workspaces and SmartPartInfo objects in the Visual Studio Designer. MVC (model-view-controller) and MVP (model-view-presenter) architectural models.

6. Event Broker Service and Action Catalog Service

Problems of loosely-coupled notification. Introduction to the Event Broker service. Characteristics of a CAB event. Static and dynamic subscriptions to an event. Specifying the thread on which an event notification is received. Static and dynamic firing of an event. Specifying the scope of a fired event.

Need for loosely coupled method invocation. Introduction to the Action Catalog service. Specifying and registering actions. Connecting to and invoking actions by means of their names. Modifying parameters passed to the action to provide output to the caller. Specifying action conditions, which are filter functions that run before the action actually gets invoked. Allowing or vetoing the action.

7. User Interface Negotiation

Problems of Smart Parts and shell sharing the main user interface, such as menus and toolbars. Solution using UIExtensionSites. Registration of UIExtensionSites by the shell. WorkItems locating UIExtensionSites by their names. Adding and removing items using the UIExtensionSite. Adding Command objects for receiving event notifications from items. Enabling and disabling Commands. Modifying user interface items after adding them, for example, checking and unchecking menu items. The special problem of the main status bar label. Extending non-ToolStripItem classes, writing  a UIElementAdapter class.

8. Using CAB with Windows Presentation Framework

Matching CAB constructs with WPF programs. Using XAML with CAB and SC-SF.

Always Available: Students' Requests

Drill-down topics selected by the students as a result of their new discoveries.


Hit Counter