Thursday, May 20, 2010

A Sample Silverlight 4 Application Using MEF, MVVM, and WCF RIA Services

This article is part one of a series on developing a Silverlight business application using MEF, MVVM Light, and WCF RIA Services.

Part 1 - Introduction, Installation, and General Application Design Topics
Part 2 - MVVM Light Topics
Part 3 - Custom Authentication, Reset Password and User Maintenance

Contents

Introduction
Requirements
Installation
Installing the IssueVision Sample Database
Installing the Web Setup Package
Architecture
Solution Structure
IssueVisionModel Class
The ViewModel Classes
The View Classes and Code-behind Files
Custom Controls for Layout
Dynamic Theming
Next Steps
History

Introduction

This sample application is the result of my initiative to learn Silverlight and WCF RIA Services. With my background of using WPF and MVVM for the past several years, I found that there is a lack of sample LOB applications that can combine the latest Silverlight enhancements with MVVM. This three part article series is my effort at creating such a sample. The choice of an issue tracking application comes from David Poll's PDC09 talk, and the design architecture is from Shawn Wildermuth's blog posts.

The main features of this issue tracking application are:

Login screen provides custom authentication and password reset based on security question and answer.
My Profile screen is for updating user information, password, security questions and answers.
User Maintenance screen is only available to Admin users, and lets Admin user add/delete/update users.
New Issue screen is for creating new issues (bugs, work items, spec defects, etc.).
My Issues screen is for tracking all active and resolved issues assigned to a user.
All Issues screen is for tracking all issues (Open, Active, Pending or Resolved).
Bug Report screen provides a summary of bug trend, bug count and the functionality to print the summary.
Four different Themes are available and can be applied dynamically at any time.
Requirements

In order to build the sample application, you need:

Microsoft Visual Studio 2010
Microsoft Silverlight 4 Tools for Visual Studio 2010
Silverlight 4 Toolkit April 2010 (included in the sample solution)
MVVM Light Toolkit V3 SP1 (included in the sample solution)

Installation

After downloading the setup package to a location on your local disk, we need to complete the following steps:

1. Installing the IssueVision Sample Database

To install the sample database, please run SqlServer_IssueVision_Schema.sql and SqlServer_IssueVision_InitialDataLoad.sql included in the setup package zip file. SqlServer_IssueVision_Schema.sql creates the database schema and database user IVUser; SqlServer_IssueVision_InitialDataLoad.sql loads all the data needed to run this application, including the initial application user ID user1 and Admin user ID admin1 with passwords all set as P@ssword1234.

Read more: Codeproject Part 1, Part 2

Posted via email from jasper22's posterous