Book Image

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

By : Muhammad Shujaat Siddiqi, Ryan Vice
Book Image

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

By: Muhammad Shujaat Siddiqi, Ryan Vice

Overview of this book

MVVM (Model View View Model) is a Microsoft best practices pattern for working in WPF and Silverlight that is highly recommended by both Microsoft and industry experts alike. This book will look at the reasons for the pattern still being slow to become an industry standard, addressing the pain points of MVVM. It will help Silverlight and WPF programmers get up and running quickly with this useful pattern.MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF will help you to choose the best MVVM approach for your project while giving you the tools, techniques, and confidence that you will need to succeed. Implementing MVVM can be a challenge, and this book will walk you through the main issues you will come across when using the pattern in real world enterprise applications.This book will help you to improve your WPF and Silverlight application design, allowing you to tackle the many challenges in creating presentation architectures for enterprise applications. You will be given examples that show the strengths and weaknesses of each of the major patterns. The book then dives into a full 3 tier enterprise implementation of MVVM and takes you through the various options available and trade-offs for each approach. During your journey you will see how to satisfy all the demands of modern WPF and Silverlight enterprise applications including scalability, testability, extensibility, and blendability.Complete your transition from ASP.NET and WinForms to Silverlight and WPF by embracing the new tools of these platforms, and the new design style that they allow for. MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF will get you up to speed and ready to take advantage of this powerful new presentation platform.
Table of Contents (21 chapters)
MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF
Credits
Foreword
About the Authors
About the Reviewer
www.PacktPub.com
Preface
MVVM Frameworks
Index

MVVM Light


There are many great MVVM frameworks out there, and we review many of them in Appendix A, but throughout this book we will be using the MVVM Light toolkit by Laurent Bugnion and GalaSoft. The toolkit is available for free on Code Plex (http://mvvmlight.codeplex) and offers many features, including:

  • A lean framework that offers only what is needed for MVVM

  • Project templates for both WPF and Silverlight, in both Visual Studio and Blend

  • Blendability support is written into the templates

  • Service locator pattern is written into the templates

  • Item templates for Visual Studio and Blend

    • Create a new view model

    • Create a new view

    • Create a new view model locator, a class that holds and manages references to view models

  • Code snippets to help increase productivity when implementing MVVM

    • mvvminpc adds a new bindable property to a view model

    • mvvmlocatorproperty adds a new view model to a view mode locator

    • mvvmpropa adds a new attached property to a dependency object (WPF only)

    • mvvmpropdp adds a new...