An Introduction to the Composite Application Library
Microsoft patterns & practices has recently made available the Composite Application Guidance for WPF. A key component of this guidance is the Composite Application Library, a library useful to create composite WPF applications.
Beside providing recommendations on how to design, develop, and deploy applications, Microsoft pattern & practices offer reference implementations of their recommendations or reusable application building blocks. There are four types of guidance: Guides, Reference Implementations, Software Factories, and Application Blocks. The Composite Application Guidance for WPF contain, beside recommendations on how to build large composite WPF applications from modules developed independently, a reference implementation called the Stock Trader RI, and a source code library named Composite Application Library (CAL). According to patterns & practices, CAL is useful to achieve 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 architecture.
- Use an architectural framework to produce a consistent and high quality integrated application.
CAL is using the following strategies, according to patterns & practices:
- It uses dependency injection techniques to simplify the code necessary to implement the Presentation Model and Model-View-Presenter patterns.
- It provides a module loading infrastructure and allows modules to perform startup operations. Modules can also register shared components for use by other modules or the shell application.
- It includes an extensive set of unit tests with the source code. Developers can modify the library and use the test to verify its functionality.
- It separates the interface and implementation for the library services.
CAL was constructed with the following patterns in mind:
- Composite User Interface patterns: Composite and Composite View, Command, Adapter
- Modularity patterns: Separated Interface and Plug In, Service Locator, Event Aggregator, Façade
- Testability patterns: Inversion of Control, Separated Presentation
The Composite Application Library can be used as it is to build composite WPF applications, but it can be also customized to fit one's needs by extending or replacing core elements. The source code of the library can be changed to acquire the desired functionality.
Todd Montgomery Dec 19, 2014