In this series of posts I’ll build a reference WPF application(template) that can be used as a template for line of business applications (LOB). . This series will take the form of a walkthrough providing an introduction to the development of a Windows Presentation Foundation (WPF) application with Prism using the MVVM (Model View ViewModel) that includes the elements that are common to most WPF applications.
This walkthrough guides you through the development of a WPF/Prism desktop application using the following steps:
- Defining the application architecture.
- Creating the Shell with his Regions Loading our Core Module.
- Use styles to create a consistent appearance.
- Use the Command pattern.
- Using Unity as IOC.
- Setting up the infrastructure for MVVM.
- Use WCF to setup our Service Layer.
- Use the Entity Framework as DAL.
- Visual Studio 2010
- You need to download the Prism guidance
Part 0: Defining the application architecture
This application will be build using a Rich Internet Application Architecture (RIA). This architecture type uses a Web infrastructure that combined with a client-side application that handles the presentation. The Web infrastructure will be build using WCF and the client-side application will be build with WPF.
The client side application will use Prism for extensibility and to get the basic infrastructure for applying MVVM pattern. This application will be composed of the following components:
- The shell: the main window that is responsible to load all other modules.
- The core module: contains the basic components to enable the basic functionalities of the application.
By dividing our client application in these two components we make our application ready to be extended; we will be able to add new features without touching to the code of the core module.
The WCF application is composed of several layers:
- The service layer containing the message types.
- The business layer contains business logic.
- The data layer contains data access components.
The data layer will use the Entity Framework 2.0 to interact with the DB.