WPF Demonstration application using PRISM and MVVM

Source Code Download

This blog post presents a demonstration/sample application to explain WPF application development using PRISM (Composite application Block) with MVVM design pattern. PRISM facilitates the development of individual modules with or without any design pattern. In fact it is up to architect to make a choice between MVP & MVVM design pattern.

The sample application provided with PRISM library is based on MVP design pattern.  As in MVP design pattern Presenter has a reference to View which many architect including me don’t like. There are not many sample application available to demonstrate the PRISM modules using MVVM design pattern. Over the last weekend I decided, It worth to demonstrate PRISM module with MVVM design pattern. I choose a very simple task for this demonstration. I have to do a search of RSS feed using REST based URL provided by Google. 

This sample demonstration application covers following concepts:

- Development of WPF PRISM modules using MVVM Design pattern  
- Passing multiple parameter/values from one Module to another to facilitate interaction
- Demonstration of Boolean to Visibility enumerator converter   

Environment :

Microsoft Visual C# 2010 Express Edition 
Composite Application Guidance Library for WPF  - May 2010 

Application Design:
The Prism Shell has two regions, Search Region and  Result Region respectively as shown in figure below.

Both regions are developed as separate Modules in separate visual studio project part of single visual studio solution. As shown in snapshot below Modules.SearchPanel and Modules.SearchResultPanel are visual studio projects for Prism Modules.


The Infra layer provides the even necessary wiring even to facilitate interaction between the two modules SeachPanel and SearchResultPanel respectively.

Infra layer has an even derived from CompositePresentationEvent which facilitates the propagation of Dictionary and hence multiple parameter/values from one module to another module.

public class SearchTopicPropagationEvent : CompositePresentationEvent<IDictionary<string, string>>


Source Code Download


1 comment:

Anonymous said...

Provide more detail on Passing multiple values from one module to another