Book Image

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

Book Image

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

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

Appendix A. MVVM Frameworks

By Muhammad Shujaat Siddiqi

The XAML community has been blessed with extraordinary developers who are always willing to volunteer their time. There are a myriad of MVVM frameworks available and it is a tough decision which one to choose from. This is because it is such a core architectural decision that it is nearly impossible to change the underlying framework in later stages of development without extreme risks. Here, MVVM Light Toolkit is our personal favorite.

Name

Author

License

MVVM Light Toolkit

Laurent Bugnion

MIT

Prism

Microsoft Patterns and Practices Team

Microsoft Patterns and Practices License (Custom)

Calcium

Daniel Vaughan

BSD

Caliburn

Rob Eisenberg

MIT

Cinch

Sacha Barber

MS-PL

Catel

Geert Van Horrik

MS-PL

As a guideline, we should be looking at how any particular framework will help us in incorporating MVVM in our design without sacrificing other enterprise architecture design requirements. We should also look at how loosely coupled it is with its own features. If a framework supports all these features but it forces you to use a particular Dependency Injection mechanism then you would definitely have to think about it. This would also help us in picking and choosing different features from different frameworks. It would be easier if they allow such choices. The base feature set to look for is as follows:

  • INotifyPropertyChanged Implmementation (for base view model)

  • ICommand Implementation

  • Messenger (Mediator)

  • Dialog support

  • Validation (for base view model)

  • Supported platforms (WPF, SL, WP, WinRT)

  • Project templates and quick starts

  • Documentation and active online community

In addition to the preceding features , these frameworks have also been incorporating other features (for example, logging) in order to be a complete enterprise application framework. You can also use those features when comparing these frameworks but since they are not particularly related to MVVM, we haven't discussed them here.