Project Description
This is a WPF reference implementation for developing an MVVM application that uses Prism (5) and Moq.



The application provides a point of reference for developing an MVVM application that solves a real world problem (i.e., generate a strong password that adheres to a set of rules) which is universally easy to understand. Technologies used are...
  • Prism (Version 5)
  • NUnit (Version 2.6.3)
  • Moq (Version 4.2.*)

Design Patterns

  • Model View View Model The Model View ViewModel (MVVM) is an architectural pattern used in software engineering that originated from Microsoft as a specialization of the Presentation Model design pattern introduced by Martin Fowler.1 Largely based on the model–view–controller pattern (MVC), MVVM is a specific implementation targeted at UI development platforms which support the event-driven programming in Windows Presentation Foundation (WPF) and Silverlight on the .NET platforms using XAML and .NET languages. Technically different, but similar, Presentation Model design patterns are available in HTML5 through AngularJS,23 KnockoutJS,4 Ext JS,5 Vue.js, and for Java the ZK framework (Model-View-Binder). (source:
  • Dependency Injection Dependency injection (DI) is a prime technique for building loosely coupled applications. It provides opportunities to simplify code, abstract and handle dependencies between objects, and automatically generate dependent object instances. Dependency injection describes the process of designing applications so that, rather than specifying concrete dependencies within the application at design time and creating the required objects in the code, the application decides at run time what objects it needs, and generates and injects these into the application. (source
  • Command Pattern In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time. This information includes the method name, the object that owns the method and values for the method parameters. (source )
  • Module Discovery This is the process of populating a module catalog. Frequently, this is done directly or by sweeping a directory, but your application may need to do this some other way, such as from a database. In these cases, you can create a custom catalog that populates itself from an appropriate source. (source:
  • Event Aggregator The EventAggregator service is primarily a container for events that allow decoupling of publishers and subscribers so they can evolve independently. This decoupling is useful in modularized applications because new modules can be added that respond to events defined by the shell or, more likely, other modules. (source
  • Loose Coupling In computing and systems design a loosely coupled system is one in which each of its components has, or makes use of, little or no knowledge of the definitions of other separate components. The notion was introduced into organizational studies by Karl Weick. Sub-areas include the coupling of classes, interfaces, data, and services. (source:

Test Driven Development

The project contains a suite of unit tests that use the NUnit ( and MOQ ( libraries.


The application uses the 'Shiny Blue' theme, which is available here on Codeplex. Visit to download other themes.

Component Assemblies

Infrastructure (logging, events, constants, and base classes)
ViewsAndViewModels (The UI and its data context)
Model (calculations)
TciPasswordGenerator (bootstrap, shell, and resources)

Build Information

The application is written in C# and is targeted for the .NET 4.5 Framework.


Note: in order to build this application, NuGet must be installed. See for information on how to install NuGet

Note: in order to run this program, NuGet may need to check the version of Prism and Moq, this requires that the app config contain...
<loadFromRemoteSources enabled="true"/>
for more information see

Last edited May 19, 2014 at 12:47 PM by TyburnConsultancy, version 16