Thursday, May 03, 2012

From Code-Behind to MVVM, a three part series...

CodeProject - Migrate from Basic to MVVM and MEF Composable Patterns for a Silverlight Application - Part 1

"Introduction

One of my previous posts shows a simple demo application that uses a WCF RIA Services class library with the code first domain data service for CRUD data operations. There are a main screen and a child window with basic navigation and code-behind patterns. What happens if we upgrade the application to that with the MVVM and MEF composable patterns? How easy are the approaches? What are the details of the coding? The article series will address the questions with the easiest approaches and detailed coding explanations. The application, after completed, will not be a full-fledged sample, but should include all major aspects regarding the MVVM and MEF composable pattern implementation without focusing on some other areas such as the UI, data validations, data service operations, or security. I'll also describe how to handle the popup child window with the new patterns, perform the composable part clean-up, and persist the state when switching screens in pure MVVM styles.

Contents

..."

CodeProject - Migrate from Basic to MVVM and MEF Composable Patterns for a Silverlight Application - Part 2

"In the Part 1 of the article series, we have started the work on changing to MVVM and MEF composable patterns for a Silverlight application previously with basic navigation and code-behind patterns. By the end of the Part 1, the application is capable of loading a xap, exporting a class module to the composition container, and rendering the same screen to the browser as that before the changes. We will implement the composable MVVM modules for the MainPage user control, the Product List parent screen, and the child window in this part based on the architecture design shown from the beginning of the Part 1.

Contents and Links

..."

CodeProject - Migrate from Basic to MVVM and MEF Composable Patterns for a Silverlight Application - Part 3

"After completing the work described in the previous parts of article series, we have created the main content holder project and upgraded the Product List screen with its child window from basic patterns to the MVVM and MEF composable patterns. In this part, we'll add another demo screen into the ProductApp.Main project and create another set of projects in the solution for a new xap assembly so that we can switch screens between exported modules and xap assemblies. We'll then implement the module clean-up processes and add the state persistence feature into the application.

Contents and Links

..."

While this was targeted at a SilverLight application, there's lessons here for anymore moving a WPF/XAML app from code-behind to MVVM.

No comments: