Freigeben über


Smart Client - Composite UI Application Block

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

 

Smart Client - Composite UI Application Block

patterns & practices Developer Center

patterns & practices Developer Center

December 2005

Summary

This page provides an overview of the Composite UI Application Block. This application block is a reusable, source code–based component based on the Microsoft .NET Framework 2.0. It provides proven practices to build complex smart client user interfaces based on well known design patterns such as the Composite pattern, in which simple user interface parts can be combined to create complex solutions, but at the same time allowing these parts to be independently developed, tested, and deployed.

Downloads
Hands-on Labs
Whitepaper
Community
License

Contents

Overview
Getting Started
Community
Future Plans
Feedback and Support
Authors and Contributors
Related Titles

Overview

How can you build complex user interfaces that take advantage of the power of the Microsoft Windows desktop, interact with multiple back-end systems, are easily deployed and configured, provide a rich user experience, use complex data manipulation mechanisms that enhance user interface responsiveness and yet are developed in a predictable and agile way? How can you architect an end-user application so it can be easily updated and maintained or in environments where multiple development teams can collaborate over time in the most effective way?

The Composite UI Application Block is designed to help you build these complex, enterprise-ready Windows Forms–based solutions. It provides a proven architecture and implementation that helps you to build applications using the common patterns found in line-of-business front-end applications.

Common Scenarios

The application block is designed to support the development of smart client line-of-business applications such as the ones found in the following scenarios:

  • Online transaction processing (OLTP) front-ends, in areas such as stock distribution centers or data entry applications
  • Rich client portals to back-end services, such as portals to government services or bank teller applications
  • UI intensive information-worker standalone applications, such as those used by call center staff, IT support desks, or stock traders

All these scenarios require rich user interaction, a shell architecture that can host the user interface and business logic "parts," and varying degrees of centralized control of the functionality and behavior that the application exposes to its users.

The Composite UI Application Block facilitates the design and implementation of your client applications in three areas:

  • It allows your application to be based on the concept of modules or plug-ins.
  • It allows developers with shell expertise to build components that hide user interface complexity from the business logic development.
  • It facilitates development using patterns for loose coupling between modules.

There are many real-world examples that have successfully implemented some of these underlying design patterns in different scenarios, such as the Integrated Dell Desktop and the scenarios enabled by the Microsoft Customer Care Framework

Figure 1 shows an example of a smart client application with the same underlying design principles of the Composite UI Application Block. In this call center application, the main screen is built using multiple collaborating parts, each one addressing a specific aspect of a business process (for example, billing, claims, or customer information). All of these parts could potentially be developed by different teams. The parts may interact with different back-end systems and can be independently versioned, deployed, and updated. However, they are integrated to provide a consistent user experience, share information between each other, and communicate to help the end user complete a specific task. Shell developers are responsible for building the components that give this application its custom, yet consistent, appearance and behavior (look and feel). The Composite UI Application Block implements the underlying architecture that helps build these types of applications.

Ff648747.ccagent1(en-us,PandP.10).gif

Figure 1. Sample call center application (reproduced with permission of Microsoft Customer Care Framework)

Audience Requirements

This guidance is intended for software architects and software developers. To develop using this guidance, you should have an understanding of the following technologies:

  • Microsoft Visual C# or Microsoft Visual Basic 2005
  • Microsoft .NET Framework 2.0
  • Windows Forms

Applications built using this guidance will require the .NET Framework 2.0 to run.

System Requirements

To use the Composite UI Application Block in your development environment, you need the following:

  • Microsoft Windows 2000, Microsoft Windows XP Professional, or Microsoft Windows Server 2003 operating system
  • Microsoft .NET Framework 2.0
  • Microsoft Visual Studio 2005 Team Edition for Software Developers (recommended, but not required)
  • NUnit 2.2.0 (Optional; required only if you are running NUnit tests. Available from the NUnit Web site.)

Design Goals

The design of the Composite UI Application Block is based around three main areas:

  • Finding and loading modules at application initialization to dynamically build a solution
  • Separating development requiring user interface and shell expertise from pure business logic development
  • Achieving re-use and modularity of your code by helping with common techniques used for loose coupling

Figure 2 shows how these main subsystems are grouped.

Ff648747.cabdesign2(en-us,PandP.10).gif

Figure 2. Subsystems of the Composite UI Application Block

Design Highlights

This section describes how the subsystems in Figure 2 help you achieve the goals of the application block.

Finding and Loading Modules

A key goal of the Composite UI Application Block is to support the development of applications through the use of independent, but collaborating, modules. This is achieved by:

  • An implementation of a catalog that specifies which modules to load.
  • A module loader that actually loads and initializes the modules that comprise your application.

These implementations can be customized for your own needs without changing the provided core Composite UI Application Block implementation because all of the main subsystems work as plug-ins. For example, your application could obtain the list of modules to be loaded for a particular user of the application from a centrally managed Web service instead of reading them from a file.

Consolidating User Interface and Shell Expertise

Seldom does every developer of an application have both knowledge of the business logic requirements and deep expertise in user interface or shell development. In large projects, productivity and consistency can be achieved if the developers with expertise in building shells can build reusable components encapsulating that knowledge. The Composite UI Application Block provides an architecture around these components and an implementation based on Windows Forms. It includes:

  • A consistent way of showing and hiding 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.

Achieving Modular Design of Your Business Logic

The functionality that focuses on helping you achieve loose coupling between your modules includes:

  • WorkItems that provide an easy way to scope which collaborating components participate in a use case, share state, events, and common services.
  • An Event Broker that provides a many-to-many, loosely coupled event system mechanism between objects in your application.
  • Placeholders for sharing State where multiple components can place or retrieve information.

Inherent Extensibility

Internally, the design is based on concepts of services (components that provide an implementation of functionality) and containers (components that hold references to your objects containing business logic, controls, and services). The Composite UI Application Block's extensibility mechanism allows you to add and extend it with your own behaviors and services in the same way it implements its functionality.

Getting Started

The Composite UI Application Block has been developed as a result of analyzing common enterprise development challenges and successful solutions to these challenges. However, because each application is unique, you will have to analyze whether this application block is suitable for your particular needs. To evaluate this application block and determine its applicability to your projects, it is suggested that you dedicate at least half of a day to explore the application block. The following is a suggested evaluation approach:

  1. Download the code and documentation in the language of your preference.
  2. Install the Composite UI Application Block and compile it.
  3. Read the "Introduction" and "Scenarios and Goals" sections of the documentation.
  4. Compile and run the QuickStart samples.
  5. Start with the "Walkthrough - Designing and Building a CAB Application" QuickStart and read the related documentation.
  6. If the application block looks like a good fit for your application, and for an in-depth, quick immersion on the code, follow the instructions on the Hands-on-Lab training content.

Community

This application block, like many patterns & practices deliverables, is associated with a community site. On this community site, you can post questions, provide feedback, or connect with other users for sharing ideas. Community members can also help Microsoft plan and test future guidance offerings, and download additional content such as extensions and training material.

Future Plans

Microsoft considers the use of this application block and other patterns & practices guidance as part of the roadmap to adopting Windows Presentation Foundation (WPF) in large smart client applications. The patterns & practices group is already considering the path toward "WinFX" technologies such as WPF, Windows Communication Foundation, and Windows Workflow Foundation.

Users of earlier releases of the User Interface Process Application Block might recognize some of the scenarios addressed by the Composite UI Application Block. The Composite UI Application Block builds on the knowledge and feedback gained from releases of the User Interface Process Application Block, but it represents a significant change in how those scenarios are addressed.

Adding navigation features to the Composite UI Application Block will be done in subsequent releases. Interim versions of the feature will be released on the community site before final release.

Feedback and Support

Questions? Comments? Suggestions? To provide feedback about this application block, or to get help with any problems, please visit the Composite UI Application Block community site. The message board on the community site is the preferred feedback and support channel because it allows you to share your ideas, questions, and solutions with the entire community. Alternatively, you can send e-mail directly to the Microsoft patterns & practices team at devfdbck@microsoft.com, although we are unable to respond to every message.

The Composite UI Application Block is a guidance offering, designed to be reused, customized, and extended. It is not a Microsoft product. For more information, see the following table.

Attribute Description
Support Code-based guidance is shipped "as is" and without warranties. Customers can obtain support through Microsoft Support Services for a fee. The code will be considered user-written by Microsoft support staff. The patterns & practices team works with product support and will assist them with escalations as needed. In addition to this, customers are encouraged to sign up with the patterns & practices online user communities, where experience is shared among users.
Functionality Provides a flexible and architecturally sound solution to a common enterprise development challenge. The guidance addresses the challenges by using base platform features and adhering to best practices. The guidance is designed to be extended and customized by users.
Release Guidance releases are typically developed in a 3–6 month life cycle. Assets are released as they become ready on the currently available platform. New versions of existing assets (possibly revised to run on later versions of the platform) are released if there is sufficient customer demand.
Compatibility Code-based guidance is designed to help solve problems over specific versions of Microsoft products. As the products change, the guidance issued may change or become obsolete. Guidance is developed with future releases in mind when possible. There are no guarantees about compatibility with earlier releases of guidance, or with past or future platform releases. A phased upgrade strategy is recommended, and coexistence of multiple versions of the guidance is given high priority by the patterns & practices team.
Form factor This guidance is released as source code. Variability is provided through configuration and defined extensibility points, as well as through direct modification of the source code. Documentation focuses on how to use the asset, how to extend it, and the goals, patterns, and tradeoffs driving its design.

Authors and Contributors

The Composite UI Application Block was produced by the following individuals:

  • Program and Product Management: William Loeffler, Srinath Vasireddy and Eugenio Pace (Microsoft Corporation)
  • Architect: Edward Jezierski (Microsoft Corporation)
  • Development: Peter Provost and Brad Wilson (Microsoft Corporation); Daniel Cazzulino and Juan Elichirigoity (Clarius Consulting); John Luif (Interlink Group Inc); Javier Arguello (Lagash Systems); Rolando Méndez and Cesar Muñoz (Artinsoft); Matthew Cosier, Philip Beadle, John Bickerstaff, Ray Trattles and Martin Granell (Readify Inc.); Matias Woloski, Mariano Szklanny and Alejandro Jack (Southworks)
  • Test team: Mohammad Al-Sabt and Carlos Farre (Microsoft Corporation); Rohit Sharma, Rajeswari Santhanam, Aruppukotai Periyasamy, Manickavasagam Sundaram, Mohammad Ashraf, Arjun B. M., Balaji Ragupathi, Saravanan Marappan, Deiva Shankar UthayaSankaralingam, and Siddharth Pandey (Infosys Technologies Ltd)
  • Edit team: RoAnn Corbisier (Microsoft Corporation); Alex Homer and Lin Joyner (Content Master Ltd); Melissa Seymour and Tina Burden McGrayne (TinaTech Inc)
  • Release Management: Sanjeev Garg (Microsoft Corporation)

Many thanks to the following advisors who provided invaluable assistance:

  • Microsoft patterns & practices: Wojtek Kozazcynski
  • Microsoft Consulting Services: Paul Nguyen and Alfred Broderick
  • Microsoft Architecture Strategy Team: Brenton Webster and John Devadoss
  • Microsoft Windows Forms .NET Product Team: David Hill, Keith Yedlin, John Rivard, and Niklas Gustafsson
  • Community Members: Norman Headlam (Fidelity Investments); Christian Nielsen and Kai Makipera (Volvo Information Technology AB); Andres Aguiar (DeKlarit); Darren Stokes, Steve Neal, Andrew Flick, and Andrew Smith (Infragistics); Maurice Flanagan (Infusion)

Smart Client Software Factory

Mobile Client Software Factory

Enterprise Library

Microsoft Customer Care Framework

patterns & practices Developer Center

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.