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.
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.
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:
- Microsoft Visual Studio 2008 SP1
- Microsoft .NET Framework 3.5 SP1 (the .NET Framework 3.5 includes WPF)
- Microsoft Silverlight (this is required only if you are creating Silverlight applications)
- Microsoft Silverlight 3 Tools for Visual Studio 2008 SP1 (this is required only if you are creating Silverlight applications)
You may also want to install the following:
- Microsoft Visual Studio 2008 Software Development Kit (SDK) 1.1 to compile Project Linker
- Microsoft Silverlight Unit Test Framework to run the unit tests in Silverlight
- White to run the acceptance tests. The acceptance tests have been developed and verified with the White 0.1.5.0 release.
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.
To learn more about the design and use of the Composite Application Library, see the following topics:
- Goals and Benefits
- Composite Application Library Baseline Architecture
- Key Decisions
- Technical Concepts
- Development Activities
- Customizing the Composite Application Library