WPF MVVM Training Michael Sync (Silverlight MVP).

Slides:



Advertisements
Similar presentations
Module 1: Creating an Application by Using Windows Presentation Foundation Overview of WPF Creating a Simple WPF Application Handling Events and Commands.
Advertisements

Expression Blend 4 – deep dive
Silverlight is dead! Long live MVVM!
MVVM Basics with Caliburn.Micro Presented by Stefan Nuxoll, Lithium PC.
Design Principles & Patterns
Understanding the MVVM pattern
Developing HTML5 Application using MVVM pattern Pekka Ylenius.
MVVM: Filling the Pattern Gap in Silverlight Application Development Bart McDonough Principal Consultant Incline Technical Group.
USING THE MODEL-VIEW- VIEWMODEL PATTERN Laurent Bugnion Director, User Experience Integration IdentityMine
Practical MVVM Joel Cochran.
Knockoutjs and JQuery The One-Two Punch for Richer MVC 4 Applications Connecticut.NET Developers Group November 13, 2012.
An Introduction to the Model-View-ViewModel Pattern Srsly? Another MV* Pattern? Srsly? Another MV* Pattern?
Or How I Learned to Stop Worrying and Love the Binding Bryan Anderson.
An Introduction To Silverlight Gergely Orosz
Design for Testability: Mocks, Stubs, Refactoring, and User Interfaces Benjamin Day benday.com |
Laurent Bugnion Senior User Experience Integrator IdentityMine
Co-founder of Molosoft WPF/SL/MVVM developer Microsoft MVP joshsmithonwpf.wordpress.com
Laurent Bugnion Director, UX MVVM Powers Silverlight Development.
Real world Windows Phone development Igor
Building Silverlight Applications Using the MVVM pattern An Introduction by Peter Messenger Senior Developer – Qmastor
Shailen Sukul Senior Solutions Architect EMC BSc | Mct | Mcpd (.Net 2/3.5) | Mcts (Sharepoint (MOSS/WSS), Biztalk, Web, Win, Dist Apps) | Mcsd.NET | Mcsd.
Joe xamlcoder.com/blog Silverlight / WPF Consultant.

Design for Testability: Mocks, Stubs, Refactoring, and User Interfaces Benjamin Day.
@benday #vslive Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
MVC and MVP. References enter.html enter.html
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Building an Offline Smart Client using Domain-Driven Design Principles Tim McCarthy.
Getting Started with Caliburn.Micro and Windows Phone 7 Gary Ewan Park Twitter: Blog:
Windows Phone MVVM and Unit Testing Step by Step Andy Wigley Windows Phone Development MVP, Mobile Software Consultant APPA Mundi Ltd WPH208.
Refactoring for Testability (or how I learned to stop worrying and love failing tests) Presented by Aaron Evans.
Model View Controller MVC Web Software Architecture.
Nikhil Kothari Software Architect Microsoft Corporation Session Code: WUX312.
The Start Menu……..Exposed What you never knew existed.
Overview of the MVVM pattern for Silverlight and WPF.
Introduction (Continued) Design Patterns (I) Lecture Two.
DEV321. demo Rule: Any slide about UX must be charcoal gray or black.
Platform abstractionSeparate UI and logic.
Model View ViewModel Architecture. MVVM Architecture components.
#SPSSAN June 30, 2012 San Diego Convention Center WRITING TESTABLE CODE In SharePoint.
Testing WebForms w/ Model-View-Presenter Erik Peterson.
MVVM Pattern Mahender Senior Software Engineer United Health Group.
Windows 8 apps and the MVVM pattern SILVERLIGHTSHOW.NET WEBINARS SERIES GILL CLEEREN, October 16 th
© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel
Programming with MVVM Miguel A. Castro Architect -
Understanding Dependency Injection… and those pesky containers Miguel A. Castro Architect -
/DEV/TM #1 Building Cross-Platform Apps with Xamarin and MvvmCross Flavius-Radu DEMIAN.
Benjamin Unit Testing & Test-Driven Development for Mere Mortals.
The cutting edge event for ITPros and Devs December 7-8, 2013 Athens, Greece Fix it once use it everywhere Elias Markelis MCT, Windows Phone Enthusiast.
Beyond Basic Unit Testing: Mocks, Stubs, User Interfaces, and Refactoring for Testability Benjamin Day
Adam Schultz MVVM and WPF. MVVM Model, View, ViewModel A software architecture designed to separate out User Interface design, Business Logic, and Data.
Real world Windows Phone development
MVVM Made Simple with Prism
Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
Building Custom Workflows
MVC and Design Patterns
Build Windows 10 UWP MVVM Apps with Prism
Building Web Applications with Microsoft ASP
It’s a Knockout! MVVM Style Web Development
Unit Testing & Test-Driven Development for Mere Mortals
Miguel A. Castro Architect IDesign
Unit Testing & Test-Driven Development for Mere Mortals
Introduction to the MVVM Pattern
What’s new for Windows 8 Devs Part 2
Unit Testing & Test-Driven Development for Mere Mortals
Working across the .NET Continuum
XAML Deep Dive for Windows & Windows Phone Apps Jump Start
Architecting Silverlight Applications with MVVM
Tech Ed North America /6/2019 2:07 PM Required Slide
An Introduction to the Model-View-ViewModel Pattern
Presentation transcript:

WPF MVVM Training Michael Sync (Silverlight MVP)

Adopting the MVVM pattern with WPF Understanding MVVM Motivation and benefits Implementing the pattern Dependency Injection and IoC Unit Test and Mock Supporting libraries and frameworks

What's MVVM? is an architectural pattern created by John Gossman from WPF team is a variation of MVC pattern is similar to Martin Fowler’s PresentationModel pattern WPF Data Binding & Commanding

Motivation and benefits Testabiltiy ( ViewModel is easier to unit test than code- behind or event driven code ) Clear seperation between UX designer and developer Increases the "Blendability" of your view Model never needs to be changed to support changes to the view ViewModel rarely needs to be changed to support changes to the view No duplicated code to update views

MVVM View knows ViewModel ViewModel knows Models But not vice versa.

View represents the user interface that the user will see. can be a user control or Data Template shouldn't contain any logic that you want to test Keep the view as simple as possible.

View Model An abstraction of View Connector between View and Model Keep View State, Value Conversion No strong or weak (via Interface) reference of View Make VM as testable as possible (e.g. no call to Singleton class) No Control related Stuff in VM

Model can be Data Model, DTO, POCO, auto- generated proxy of domain class and UI Model based on how you want to have the separation between Domain Service and Presentation Layer No reference to ViewModel

Disadvantages of MVVM lack of standardization so everyone has own favor For simple UI, M-V-VM can be overkill

Implementing MVVM DEMO – Simple MVVM DEMO – MVVM + Data Template DEMO – DI + IoC DEMO – BDD

Supporting libraries and frameworks WPF Team : MVVM ToolkitMVVM Toolkit MS Pattern and Practice Team : Composite WPF (Prism)Composite WPF (Prism) Josh Smith. "MVVM Foundation"MVVM Foundation Sacha Barber. "Cinch."Cinch Karl Shifflett. "Ocean"Ocean Laurent Bugnion. "MVVM Light Toolkit"MVVM Light Toolkit Lester Lobo. "CoreMVVM"CoreMVVM Rob Eisenberg. "Caliburn"Caliburn William e Kempf. "Onyx"Onyx Peter O’Hanlon. "GoldLight"GoldLight jbe. "WPF Application Framework (WAF)"WPF Application Framework (WAF) Paul Stovel : MacroModelsMacroModels