This version of the Composite Application Guidance is designed to help you build applications in WPF and Silverlight that have a single code base. The guidance uses a number of design patterns. Familiarity with these technologies and patterns is useful for evaluating and adopting the Composite Application Library.
Community Feedback and Support
Included in the Composite Application Guidance
Stock Trader Reference Implementation (Stock Trader RI)
This is a sample composite application that is based on a real-world scenario. This intentionally incomplete application illustrates the Composite Application baseline architecture. This is a good reference to see how many of the challenges are addressed by this guidance when building composite applications.
Composite Application Library source code
Developers can use the Composite Application Library to develop WPF or Silverlight applications that are composed of independent and collaborating modules. The library includes extensions to support the integration of the Unity Application Block.
These include the source code for several small, focused applications that illustrate user interface (UI) composition, modularity, commanding, event aggregation, and multi-targeting applications between WPF and Silverlight. The Getting Started Hands-On Labsprovide step-by-step instructions to create your first application using the Composite Application Library in WPF or Silverlight.
This includes the architectural overview, Stock Trader RI overview, design and technical concepts for composite applications, applied patterns, How-to topics, QuickStart overviews, and deployment topics. Much of this guidance is applicable even if you are not using the Composite Application Library, but you want to know best practices for creating composite applications.
- Nikhil Kothari’s ViewModel Pattern in Silverlight using Behaviors This is a very good example. Also check out ViewModel Pattern extended with the Dynamic Language Runtime. Nikhil has a Silverlight.FX framework which you should try it out.
- Jonas Follesoe’s Blog This author has several blog entries and samples showing MVVM.
- Building business applications with Silverlight 2 Manish Dalal has a fairly complete sample using MVVM pattern.
- Combining different Separated Presentation Patterns
- WPF & Silverlight Line of Business UI Design Pattern Home Page
- Developing a Casual Game with Silverlight 2 This example shows a classic MVC behavior. View is responsible to create the controller. Actions from view is deligated to the controller. Model notify view on changes and view is responsible for updating itself.
- Implementing the MVP Pattern in Silverlight This example implments Passive View. The View is completely encapsulated with an interface. It is quite testable. However, even a very simple example like this one has lots of code.
- MVC# This one is similar to the previous example. It has a mini dependency injection container called TasksManager to group options together.
So when evaluating a pattern, it is really important to at details such as:
- How are view and controller conntected?
- How an user action from the view is sent to controller?
- Who is responsible for updating the view?