SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
MVVM Light Toolkit
Works Great, Less Complicated
             Tom Fischer
          September 29, 2011
Agenda


∗ Background
  ∗ Enterprise Applications
  ∗ XAML
  ∗ Ramifications
∗ Architecture Considerations
  ∗ Patterns
  ∗ Toolkits
∗ Toolkit Demonstration
  ∗ Sample Application
  ∗ Incorporating MVVM Light
Background:
Enterprise Application Definition

∗ Targets
  ∗ Any type of organization
  ∗ Any type of industry
∗ Not intended for consumers
∗ Function focused, such as, accounting, purchasing,
  sales, etc.
Background:
Enterprise Application Sample
Background:
XAML Snippet
Background:
             XAML Definition

∗ Declarative markup language for .NET API with XML
  nodes equating to CLR objects
∗ Features include
  ∗ Rich eventing support
  ∗ Declarative databinding
  ∗ Developer friendly conventions, such as, the content
    property equals the “inner xml” of many nodes
Background:
XAML & CLR Objects
Background:
                Ramifications


∗ Enterprise applications do not ruthlessly follow well
  trodden UI guidelines; business users know what they
  want
∗ XAML does not mirror ASP.NET or Windows Form
  technologies, blindly adhering to their patterns &
  practices may result in harder to build and maintain
  Silverlight/WPF applications
Architecture Considerations:
                 Options


∗ Patterns                            ∗ Toolkits
  ∗   Code Behind                        ∗   Caliburn Micro
  ∗   MVC                                ∗   Catel
  ∗   MVP                                ∗   MVVM Foundation
  ∗   MVVM                               ∗   MVVM Light Silverlight
                                         ∗   Simple MVVM
                                         ∗   Prism

              Note: The above lists are NOT exhaustive.
             Many other relevant patterns and toolkits exist.
Architecture Considerations:
  The UI Pattern’s Pattern
Architecture Considerations:
         UI Pattern Picking


∗ Theoretical considerations
  ∗ Not the same as most software patterns (maybe why
    some call them “frameworks”?)
  ∗ Technology dominates
∗ Practical considerations
  ∗ Application complexity and life span
  ∗ Development team’s abilities and interests
  ∗ Organizational resources and support
Architecture Considerations:
    UI Patterns and Technology

∗ MVC (Model-View-Controller)
  ∗ Conceived when viewers offered very little support for a
    software developer writing presentation code
  ∗ Built with language and platform specific helpers
∗ MVP (Model-View-Presenter)
  ∗ 2nd generation MVC; facilitated testing
  ∗ Response to feature rich viewers
∗ MVVM (Model-View-ViewModel)
  ∗ 3rd generation MVC; reduced coder/designer friction
  ∗ Response to XAML
Architecture Considerations:
          Toolkit Overview


∗ Plugs gap between technology and its use; maybe
  entitled “helper” code!?
∗ Considerations
  ∗ Fit (Simple as possible, but not simpler)
    ∗ How well does it plug the gap?
    ∗ Does it include more than required?
  ∗ Obsolescence susceptibility
    ∗ Handle newer, better technologies
    ∗ Ingest requirement/application changes
Architecture Considerations:
              Prism Toolkit

∗ Overview
  ∗ Supports WPF and Silverlight
  ∗ Available on Microsoft Download Center
      ∗ V4 (11/2010)
∗ Supports MVVM many features, such as,
  ∗   Bootstrapper
  ∗   Dependency Injection (Unity & MEF)
  ∗   Composition (über)
  ∗   Event Aggregator
  ∗   Wiring Commands & Events
Side Note:
Prism It’s Complicated, Documented & Supported
Architecture Considerations:
         Caliburn Micro Toolkit

∗ Overview
  ∗ Supports WPF, Silverlight and Windows 7
  ∗ Paired down version of Caliburn (10X smaller)
  ∗ Available on CodePlex
      ∗ V1.2 RTW (7/2011)
      ∗ 2,000+ downloads
∗ Supports MVVM and MVP with
  ∗   Bootstrapper
  ∗   Composition
  ∗   Event Aggregator
  ∗   Window Manager
  ∗   Wiring Commands & Events
Architecture Considerations:
        MVVM Light Toolkit


∗ Overview
  ∗ Supports WPF, Silverlight and Windows 7
  ∗ Available on CodePlex
    ∗ V3 SP1 (2/2011)
    ∗ 20,000+ downloads
∗ Supports MVVM with
  ∗ Event Aggregator
  ∗ Service Locator
  ∗ Wiring Commands & Events
Side Note:
What about CSLA.NET, Enterprise Library & Entity Framework?




  ∗ CSLA.NET
     ∗ Solves data access & business logic problems
     ∗ Works with most .NET UI technologies, especially those
       leveraging databinding
     ∗ Not focused on specific UI pattern or technology
  ∗ Enterprise Library
     ∗ Addresses aspect oriented & generic problems
     ∗ Not associated with any UI pattern or technology
  ∗ Entity Framework
     ∗ Handles database exchanges
     ∗ Not associated with any UI pattern or technology
Architecture Considerations:
             Conclusion


∗ MVVM pattern facilitates XAML-based enterprise
  applications
  ∗ Supports commands & databinding
  ∗ Minimizes designer-developer friction
∗ Many toolkits exist supporting MVVM-XAML
  ∗ Offer expected “helpers”
  ∗ Require varying degrees of “buy-in”
Toolkit Demonstration:
               Overview


∗ Work thru a simple client information application with
  Silverlight (out of browser)
∗ Implement three iterations (as projects)
  ∗ 1st Iteration constructed as a basic non-MVVM
  ∗ 2nd Iteration converted to an MVVM to help handle
    additional requirements
  ∗ 3rd Iteration incorporate MVVM Light to fix a few
    architecture issues uncovered in 2nd Iteration
Toolkit Demonstration:
        Solution


  1st Iteration




                  2ND Iteration




  3rd Iteration
Toolkit Demonstration:
      Why MVVM Light Toolkit?


∗ Solves known issues
  ∗ Communications between controls
  ∗ Turning UI events into commands
∗ Avoids unnecessary features (for now), e.g.,
  ∗ Composition
  ∗ Navigation
∗ Reasonably documented and stable
Toolkit Demonstration:
     Sample Application 1st Iteration




∗ MainPage.xaml.cs communicates with two models
  (ClientInformation and ClientPreferences)
∗ Databinding not employed; properties programmatically
  manipulated
Toolkit Demonstration:
Sample Application Models




    2nd & 3rd Iteration
Toolkit Demonstration:
    Sample Application 2nd Iteration




∗ MainPage.xaml.cs indirectly communicates with three
  models (ClientInformation, ClientPreferences and
  ClientSale) via two ViewModel classes
∗ Databinding employed; UI events initiate data access
Toolkit Demonstration:
    Sample Application 3rd Iteration




∗ 2nd iteration + MVVM Light Toolkit
∗ Databinding and commands leveraged to allow all logic to
  live within the ViewModels
Toolkit Demonstration:
                 Recap


∗ 1st Iteration – architecture typical of many Windows
  Form-based applications
∗ 2nd Iteration – MVVM pattern applied with a few
  resulting “programming holes”
  ∗ Communications limited between controls
  ∗ Events to commands not fully supported
∗ 3rd Iteration – MVVM Light Toolkit addresses
  shortcomings from the 2nd Iteration
Toolkit Demonstration:
Some Other MVVM Light Features…


 ∗ Ability to dynamically load appropriate ViewModel
   classes (ServiceLocation)
 ∗ Designed to work well with Blend
 ∗ Developer Candy
   ∗ NuGet support
   ∗ Visual Studio templates
   ∗ C# snippets
∗Thanks for attending!
∗Any other questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Sexy Architecting. VIPER: MVP on steroids
Sexy Architecting. VIPER: MVP on steroidsSexy Architecting. VIPER: MVP on steroids
Sexy Architecting. VIPER: MVP on steroidsDmytro Zaitsev
 
Spring MVC Intro / Gore - Nov NHJUG
Spring MVC Intro / Gore - Nov NHJUGSpring MVC Intro / Gore - Nov NHJUG
Spring MVC Intro / Gore - Nov NHJUGTed Pennings
 
KnockOutjs from Scratch
KnockOutjs from ScratchKnockOutjs from Scratch
KnockOutjs from ScratchUdaya Kumar
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.jsPagepro
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Naresh Chintalcheru
 
Rambler.iOS #5: Разбираем Massive View Controller
Rambler.iOS #5: Разбираем Massive View ControllerRambler.iOS #5: Разбираем Massive View Controller
Rambler.iOS #5: Разбираем Massive View ControllerRAMBLER&Co
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedStéphane Bégaudeau
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsTakuya Tejima
 
Vue js and Vue Material
Vue js and Vue MaterialVue js and Vue Material
Vue js and Vue MaterialEueung Mulyana
 

Was ist angesagt? (20)

From mvc to viper
From mvc to viperFrom mvc to viper
From mvc to viper
 
Sexy Architecting. VIPER: MVP on steroids
Sexy Architecting. VIPER: MVP on steroidsSexy Architecting. VIPER: MVP on steroids
Sexy Architecting. VIPER: MVP on steroids
 
Vuex
VuexVuex
Vuex
 
Spring MVC Intro / Gore - Nov NHJUG
Spring MVC Intro / Gore - Nov NHJUGSpring MVC Intro / Gore - Nov NHJUG
Spring MVC Intro / Gore - Nov NHJUG
 
KnockOutjs from Scratch
KnockOutjs from ScratchKnockOutjs from Scratch
KnockOutjs from Scratch
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Wicket Intro
Wicket IntroWicket Intro
Wicket Intro
 
Vue.js
Vue.jsVue.js
Vue.js
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC
 
Vue presentation
Vue presentationVue presentation
Vue presentation
 
Vue.js part1
Vue.js part1Vue.js part1
Vue.js part1
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
Rambler.iOS #5: Разбираем Massive View Controller
Rambler.iOS #5: Разбираем Massive View ControllerRambler.iOS #5: Разбираем Massive View Controller
Rambler.iOS #5: Разбираем Massive View Controller
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.js
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
 
Spring 4 Web App
Spring 4 Web AppSpring 4 Web App
Spring 4 Web App
 
Vue business first
Vue business firstVue business first
Vue business first
 
Web components
Web componentsWeb components
Web components
 
Vue js and Vue Material
Vue js and Vue MaterialVue js and Vue Material
Vue js and Vue Material
 

Andere mochten auch

Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7Igor Moochnick
 
Understanding The MVVM Pattern (TechDays Belgium)
Understanding The MVVM Pattern (TechDays Belgium)Understanding The MVVM Pattern (TechDays Belgium)
Understanding The MVVM Pattern (TechDays Belgium)Laurent Bugnion
 
A Day In The Life Of A WPF/SL Integrator
A Day In The Life Of A WPF/SL IntegratorA Day In The Life Of A WPF/SL Integrator
A Day In The Life Of A WPF/SL IntegratorLaurent Bugnion
 
MVVM Light for UWP
MVVM Light for UWPMVVM Light for UWP
MVVM Light for UWPRobert Iagar
 
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )Ahmed Emad
 

Andere mochten auch (6)

Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
 
Understanding The MVVM Pattern (TechDays Belgium)
Understanding The MVVM Pattern (TechDays Belgium)Understanding The MVVM Pattern (TechDays Belgium)
Understanding The MVVM Pattern (TechDays Belgium)
 
A Day In The Life Of A WPF/SL Integrator
A Day In The Life Of A WPF/SL IntegratorA Day In The Life Of A WPF/SL Integrator
A Day In The Life Of A WPF/SL Integrator
 
MVVM Light for UWP
MVVM Light for UWPMVVM Light for UWP
MVVM Light for UWP
 
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )
 
Pattern MVVM avec MVVM Light Toolkit
Pattern MVVM avec MVVM Light ToolkitPattern MVVM avec MVVM Light Toolkit
Pattern MVVM avec MVVM Light Toolkit
 

Ähnlich wie MVVM Light Toolkit Works Great, Less Complicated

Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC vipin kumar
 
.NET Intro & Dependency Injection Workshop
.NET Intro & Dependency Injection Workshop.NET Intro & Dependency Injection Workshop
.NET Intro & Dependency Injection WorkshopSerhii Kokhan
 
Intro to Microsoft.NET
Intro to Microsoft.NET Intro to Microsoft.NET
Intro to Microsoft.NET rchakra
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCSirwan Afifi
 
Business Apps with the Universal Windows Platform
Business Apps with the Universal Windows PlatformBusiness Apps with the Universal Windows Platform
Business Apps with the Universal Windows PlatformChristian Nagel
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netconline training
 
Building Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) ApplicationBuilding Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) Applicationssusere19c741
 
Building Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) ApplicationBuilding Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) Applicationssusere19c741
 
A Domain Specific Language for Enterprise Grade Cloud-Mobile Hybrid Applications
A Domain Specific Language for Enterprise Grade Cloud-Mobile Hybrid ApplicationsA Domain Specific Language for Enterprise Grade Cloud-Mobile Hybrid Applications
A Domain Specific Language for Enterprise Grade Cloud-Mobile Hybrid Applicationsajithranabahu
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notesWE-IT TUTORIALS
 
Web tier-framework-mvc
Web tier-framework-mvcWeb tier-framework-mvc
Web tier-framework-mvcKashfUlHuda1
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayLanate Drummond
 
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Cloudify: Open vCPE Design Concepts and Multi-Cloud OrchestrationCloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Cloudify: Open vCPE Design Concepts and Multi-Cloud OrchestrationCloudify Community
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp EnGregory Renard
 

Ähnlich wie MVVM Light Toolkit Works Great, Less Complicated (20)

Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
.NET Intro & Dependency Injection Workshop
.NET Intro & Dependency Injection Workshop.NET Intro & Dependency Injection Workshop
.NET Intro & Dependency Injection Workshop
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Intro to Microsoft.NET
Intro to Microsoft.NET Intro to Microsoft.NET
Intro to Microsoft.NET
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Business Apps with the Universal Windows Platform
Business Apps with the Universal Windows PlatformBusiness Apps with the Universal Windows Platform
Business Apps with the Universal Windows Platform
 
.net Framework
.net Framework.net Framework
.net Framework
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
 
Building Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) ApplicationBuilding Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) Application
 
Building Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) ApplicationBuilding Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) Application
 
A Domain Specific Language for Enterprise Grade Cloud-Mobile Hybrid Applications
A Domain Specific Language for Enterprise Grade Cloud-Mobile Hybrid ApplicationsA Domain Specific Language for Enterprise Grade Cloud-Mobile Hybrid Applications
A Domain Specific Language for Enterprise Grade Cloud-Mobile Hybrid Applications
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
 
Web tier-framework-mvc
Web tier-framework-mvcWeb tier-framework-mvc
Web tier-framework-mvc
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
Mvc3 part1
Mvc3   part1Mvc3   part1
Mvc3 part1
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
 
Asp.net new
Asp.net newAsp.net new
Asp.net new
 
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Cloudify: Open vCPE Design Concepts and Multi-Cloud OrchestrationCloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 

Kürzlich hochgeladen

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 

Kürzlich hochgeladen (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 

MVVM Light Toolkit Works Great, Less Complicated

  • 1. MVVM Light Toolkit Works Great, Less Complicated Tom Fischer September 29, 2011
  • 2. Agenda ∗ Background ∗ Enterprise Applications ∗ XAML ∗ Ramifications ∗ Architecture Considerations ∗ Patterns ∗ Toolkits ∗ Toolkit Demonstration ∗ Sample Application ∗ Incorporating MVVM Light
  • 3. Background: Enterprise Application Definition ∗ Targets ∗ Any type of organization ∗ Any type of industry ∗ Not intended for consumers ∗ Function focused, such as, accounting, purchasing, sales, etc.
  • 6. Background: XAML Definition ∗ Declarative markup language for .NET API with XML nodes equating to CLR objects ∗ Features include ∗ Rich eventing support ∗ Declarative databinding ∗ Developer friendly conventions, such as, the content property equals the “inner xml” of many nodes
  • 8. Background: Ramifications ∗ Enterprise applications do not ruthlessly follow well trodden UI guidelines; business users know what they want ∗ XAML does not mirror ASP.NET or Windows Form technologies, blindly adhering to their patterns & practices may result in harder to build and maintain Silverlight/WPF applications
  • 9. Architecture Considerations: Options ∗ Patterns ∗ Toolkits ∗ Code Behind ∗ Caliburn Micro ∗ MVC ∗ Catel ∗ MVP ∗ MVVM Foundation ∗ MVVM ∗ MVVM Light Silverlight ∗ Simple MVVM ∗ Prism Note: The above lists are NOT exhaustive. Many other relevant patterns and toolkits exist.
  • 10. Architecture Considerations: The UI Pattern’s Pattern
  • 11. Architecture Considerations: UI Pattern Picking ∗ Theoretical considerations ∗ Not the same as most software patterns (maybe why some call them “frameworks”?) ∗ Technology dominates ∗ Practical considerations ∗ Application complexity and life span ∗ Development team’s abilities and interests ∗ Organizational resources and support
  • 12. Architecture Considerations: UI Patterns and Technology ∗ MVC (Model-View-Controller) ∗ Conceived when viewers offered very little support for a software developer writing presentation code ∗ Built with language and platform specific helpers ∗ MVP (Model-View-Presenter) ∗ 2nd generation MVC; facilitated testing ∗ Response to feature rich viewers ∗ MVVM (Model-View-ViewModel) ∗ 3rd generation MVC; reduced coder/designer friction ∗ Response to XAML
  • 13. Architecture Considerations: Toolkit Overview ∗ Plugs gap between technology and its use; maybe entitled “helper” code!? ∗ Considerations ∗ Fit (Simple as possible, but not simpler) ∗ How well does it plug the gap? ∗ Does it include more than required? ∗ Obsolescence susceptibility ∗ Handle newer, better technologies ∗ Ingest requirement/application changes
  • 14. Architecture Considerations: Prism Toolkit ∗ Overview ∗ Supports WPF and Silverlight ∗ Available on Microsoft Download Center ∗ V4 (11/2010) ∗ Supports MVVM many features, such as, ∗ Bootstrapper ∗ Dependency Injection (Unity & MEF) ∗ Composition (über) ∗ Event Aggregator ∗ Wiring Commands & Events
  • 15. Side Note: Prism It’s Complicated, Documented & Supported
  • 16. Architecture Considerations: Caliburn Micro Toolkit ∗ Overview ∗ Supports WPF, Silverlight and Windows 7 ∗ Paired down version of Caliburn (10X smaller) ∗ Available on CodePlex ∗ V1.2 RTW (7/2011) ∗ 2,000+ downloads ∗ Supports MVVM and MVP with ∗ Bootstrapper ∗ Composition ∗ Event Aggregator ∗ Window Manager ∗ Wiring Commands & Events
  • 17. Architecture Considerations: MVVM Light Toolkit ∗ Overview ∗ Supports WPF, Silverlight and Windows 7 ∗ Available on CodePlex ∗ V3 SP1 (2/2011) ∗ 20,000+ downloads ∗ Supports MVVM with ∗ Event Aggregator ∗ Service Locator ∗ Wiring Commands & Events
  • 18. Side Note: What about CSLA.NET, Enterprise Library & Entity Framework? ∗ CSLA.NET ∗ Solves data access & business logic problems ∗ Works with most .NET UI technologies, especially those leveraging databinding ∗ Not focused on specific UI pattern or technology ∗ Enterprise Library ∗ Addresses aspect oriented & generic problems ∗ Not associated with any UI pattern or technology ∗ Entity Framework ∗ Handles database exchanges ∗ Not associated with any UI pattern or technology
  • 19. Architecture Considerations: Conclusion ∗ MVVM pattern facilitates XAML-based enterprise applications ∗ Supports commands & databinding ∗ Minimizes designer-developer friction ∗ Many toolkits exist supporting MVVM-XAML ∗ Offer expected “helpers” ∗ Require varying degrees of “buy-in”
  • 20. Toolkit Demonstration: Overview ∗ Work thru a simple client information application with Silverlight (out of browser) ∗ Implement three iterations (as projects) ∗ 1st Iteration constructed as a basic non-MVVM ∗ 2nd Iteration converted to an MVVM to help handle additional requirements ∗ 3rd Iteration incorporate MVVM Light to fix a few architecture issues uncovered in 2nd Iteration
  • 21. Toolkit Demonstration: Solution 1st Iteration 2ND Iteration 3rd Iteration
  • 22. Toolkit Demonstration: Why MVVM Light Toolkit? ∗ Solves known issues ∗ Communications between controls ∗ Turning UI events into commands ∗ Avoids unnecessary features (for now), e.g., ∗ Composition ∗ Navigation ∗ Reasonably documented and stable
  • 23. Toolkit Demonstration: Sample Application 1st Iteration ∗ MainPage.xaml.cs communicates with two models (ClientInformation and ClientPreferences) ∗ Databinding not employed; properties programmatically manipulated
  • 24. Toolkit Demonstration: Sample Application Models 2nd & 3rd Iteration
  • 25. Toolkit Demonstration: Sample Application 2nd Iteration ∗ MainPage.xaml.cs indirectly communicates with three models (ClientInformation, ClientPreferences and ClientSale) via two ViewModel classes ∗ Databinding employed; UI events initiate data access
  • 26. Toolkit Demonstration: Sample Application 3rd Iteration ∗ 2nd iteration + MVVM Light Toolkit ∗ Databinding and commands leveraged to allow all logic to live within the ViewModels
  • 27. Toolkit Demonstration: Recap ∗ 1st Iteration – architecture typical of many Windows Form-based applications ∗ 2nd Iteration – MVVM pattern applied with a few resulting “programming holes” ∗ Communications limited between controls ∗ Events to commands not fully supported ∗ 3rd Iteration – MVVM Light Toolkit addresses shortcomings from the 2nd Iteration
  • 28. Toolkit Demonstration: Some Other MVVM Light Features… ∗ Ability to dynamically load appropriate ViewModel classes (ServiceLocation) ∗ Designed to work well with Blend ∗ Developer Candy ∗ NuGet support ∗ Visual Studio templates ∗ C# snippets