Composite Application Library

The Composite Application Library helps architects and developers create composite Windows Presentation Foundation (WPF) and Silverlight applications. Composite applications are composed of discrete, functionally complete, pieces that work together to create a single, integrated user interface. The Composite Application Library accelerates the development of composite applications using proven design patterns to help you build these types of applications.

The Composite Application Library is designed to help architects and developers create composite applications and need to accomplish the following:

  • Build clients composed of independent, yet cooperating, modules.
  • Separate the concerns of module builders from the concerns of the shell developer; by doing this, business units can concentrate on developing domain-specific modules instead of the WPF or Silverlight architecture.
  • Use an architectural infrastructure to produce a consistent and high quality integrated application.
  • Build applications that target both WPF and Silverlight.

Your composite application will use the Composite Application Library, and it may use the Unity Extensions for Composite Application Library and the Unity Application Block. These are built on the .NET Framework 3.5 SP1, for WPF, or the .NET Framework for Silverlight 3, as illustrated in Figure 1.

Ff921125.7cc6c77e-84c0-438a-9bcc-0259657ec88c(en-us,PandP.20).png

Figure 1

Composite application package

The Composite Application Library addresses a number of common requirements for building composite applications. These compositional needs are described in When to Use This Guidance. As a whole, the Composite Application Library accelerates development by providing the services and components to address these needs.

System Requirements

This guidance was designed to run on the Microsoft Windows Vista, Windows XP Professional, Windows Server 2003, or Windows Server 2008 operating system. WPF applications built using this guidance will require the .NET Framework 3.5 SP1 to run and Silverlight applications will require the .NET Framework for Silverlight 3.

Before you can use the Composite Application Library, the following must be installed:

You may also want to install the following:

Organization of the Composite Application Library

The Composite Application Library can either be applied to a desktop application, that is most likely using WPF, or to a Silverlight application.

The Composite Application Library targeted for desktop applications consists of three assemblies:

  • Microsoft.Practices.Composite. This assembly contains interfaces and components to help build composite applications that are not specific to a user interface technology. These components include the EventAggregator, TraceLogger, ModuleManager, ModuleCatalog, IModuleRetriever, and ModuleLoader.
  • Microsoft.Practices.Composite.Presentation. This assembly contains components that relate to the presentation layer of the desktop application. These include CompositeCommand, DelegateCommand, CompositePresentationEvent, and RegionManager.
  • Microsoft.Practices.Composite.UnityExtensions. This assembly provides components to use the Unity Container Application Block with the Composite Application Library. These components include UnityBootstrapper and UnityServiceLocatorAdapter.

The Composite Application Library targeted for Silverlight applications consists of three assemblies:

  • Microsoft.Practices.Composite. Most of the elements in this assembly are linked to the components in the Microsoft.Practices.Composite assembly listed earlier. For Silverlight, there are additional classes that handle remote module loading, such as the FileDownloader and XapModuleRetriever.
  • Microsoft.Practices.Composite.Presentation. Most of the elements in this assembly are linked to the components in the Microsoft.Practices.Composite.Presentation assembly listed earlier. Additionally, this assembly contains interfaces and components to help build composite applications that are specific to Silverlight, such as CompositeCommand, DelegateCommand, and ViewsCollection.
  • Microsoft.Practices.Composite.UnityExtensions. This assembly provides components to use the Unity Container Application Block for Silverlight with the Composite Application Library. These components include UnityBootstrapper and UnitServiceLocatorAdapter.

Applications based on the Composite Application Library are typically organized by shell, module, and shared projects. Figure 2 illustrates the solution layout for the Stock Trader RI. If you are building a composite application that targets both WPF and Silverlight, the solution structure may be a bit different. For more information, see the Multi-Targeting technical concept.

Ff921125.fb1e88eb-04d2-4571-b613-367043ff86e9(en-us,PandP.20).png

Figure 2

Solution layout

To learn more about the design and use of the Composite Application Library, see the following topics:

Home page on MSDN | Community site