MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

If you’re using Silverlight and WPF, then employing the MVVM pattern can make a powerful difference to your projects, reducing code and bugs in one. This book is an invaluable resource for serious developers.

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

Progressing
Ryan Vice, Muhammad Shujaat Siddiqi

If you’re using Silverlight and WPF, then employing the MVVM pattern can make a powerful difference to your projects, reducing code and bugs in one. This book is an invaluable resource for serious developers.
$29.99
$49.99
RRP $29.99
RRP $49.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849683425
Paperback490 pages

About This Book

  • Build an enterprise application using Silverlight and WPF, taking advantage of the powerful MVVM pattern, with this book and e-book
  • Discover the evolution of presentation patterns—by example—and see the benefits of MVVM in the context of the larger picture of presentation patterns
  • Customize the MVVM pattern for your projects’ needs by comparing the various implementation styles

Who This Book Is For

This book will be a valuable resource for Silverlight and WPF developers who want to fully maximize the tools with recommended best practices for enterprise development. This is an advanced book and you will need to be familiar with C#, the .Net framework, and Silverlight or WPF.

Table of Contents

Chapter 1: Presentation Patterns
The Project Billing sample application
History of presentational patterns
Monolithic Project Billing sample
Summary
Chapter 2: Introduction to MVVM
History
Structure
WPF and Silverlight enablers
MVVM project billing sample
Benefits of MVVM
Issues and pain points of MVVM
MVVM Light
Summary
Chapter 3: Northwind – Foundations
Northwind requirements
Presentation tier foundation
Data access tier
Listing the customers
Adding tabs
Viewing customer details
Wiring up the customer list box
Summary
Chapter 4: Northwind—Services and Persistence Ignorance
Adding a Service Layer
Integrating the Service Layer
Persistence ignorance and custom models
Summary
Chapter 5: Northwind—Commands and User Inputs
Pure MVVM
Making it easier with frameworks
Updating customer details
Gestures, events, and commands
Summary
Chapter 6: Northwind—Hierarchical View Model and IoC
Adding orders to customer details
Viewing order details
Summary
Chapter 7: Dialogs and MVVM
Should we make a compromise?
Dialog service
Mediators
Attached behaviors
Summary
Chapter 8: Workflow-based MVVM Applications
WF for business rules execution
WF for controlling application flow
Summary
Chapter 9: Validation
Validations and dependency properties
Error templates
Validation in MVVM-based applications
Error notifications
Summary
Chapter 10: Using Non-MVVM Third-party Controls
Using attached behaviors
Using binding reflector
readonly CLR properties (with no change notification support)
Using MVVM adapters
Summary
Chapter 11: MVVM Application Performance
Asynchronous binding
Asynchronous View Model construction
Priority binding
Virtualization and paging
Using BackgroundWorker
Targeting system configuration
Event Throttling
Lazy Initialization
Summary

What You Will Learn

  • Maximize separation of concerns by taking advantage of WPF and Silverlight’s rich binding system, templates, and commanding infrastructure
  • Discover the built-in support for MVVM in Entity Framework and WCF
  • Create unit testable user interfaces the MVVM way
  • Work in parallel with minimal dependencies by creating blendable architectures
  • Solve common MVVM problems both with and without frameworks depending on your preference
  • Extend your architecture and test it by using inversion of control frameworks
  • Tackle complex designs by using hierarchical view model design and mediators
  • Reduce the amount of code in your user interface by letting the WPF and Silverlights binding system eliminate your need to do things like casting controls and dispatching
  • Best practices for dealing with collections
  • Create designs that allow for dramatically changing your user interface without having to change code outside the view using data templates

In Detail

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.

Authors

Table of Contents

Chapter 1: Presentation Patterns
The Project Billing sample application
History of presentational patterns
Monolithic Project Billing sample
Summary
Chapter 2: Introduction to MVVM
History
Structure
WPF and Silverlight enablers
MVVM project billing sample
Benefits of MVVM
Issues and pain points of MVVM
MVVM Light
Summary
Chapter 3: Northwind – Foundations
Northwind requirements
Presentation tier foundation
Data access tier
Listing the customers
Adding tabs
Viewing customer details
Wiring up the customer list box
Summary
Chapter 4: Northwind—Services and Persistence Ignorance
Adding a Service Layer
Integrating the Service Layer
Persistence ignorance and custom models
Summary
Chapter 5: Northwind—Commands and User Inputs
Pure MVVM
Making it easier with frameworks
Updating customer details
Gestures, events, and commands
Summary
Chapter 6: Northwind—Hierarchical View Model and IoC
Adding orders to customer details
Viewing order details
Summary
Chapter 7: Dialogs and MVVM
Should we make a compromise?
Dialog service
Mediators
Attached behaviors
Summary
Chapter 8: Workflow-based MVVM Applications
WF for business rules execution
WF for controlling application flow
Summary
Chapter 9: Validation
Validations and dependency properties
Error templates
Validation in MVVM-based applications
Error notifications
Summary
Chapter 10: Using Non-MVVM Third-party Controls
Using attached behaviors
Using binding reflector
readonly CLR properties (with no change notification support)
Using MVVM adapters
Summary
Chapter 11: MVVM Application Performance
Asynchronous binding
Asynchronous View Model construction
Priority binding
Virtualization and paging
Using BackgroundWorker
Targeting system configuration
Event Throttling
Lazy Initialization
Summary

Book Details

ISBN 139781849683425
Paperback490 pages
Read More

Recommended for You

Microsoft Silverlight 5: Building Rich Enterprise Dashboards
$ 29.99
Silverlight 4 User Interface Cookbook
$ 29.99
Microsoft Silverlight 4 Business Application Development: Beginner’s Guide
$ 32.99