SlideShare a Scribd company logo
Boulos Dib
Independent Consultant
        Napeague Inc.
           February 15, 2011
   A pattern that describes how UI components
    interact with other application code.

   Associated with Microsoft XAML platforms
    (Silverlight, WPF)

   MVVM is not complicated, really!!!, simple is
    good.
   Not a framework nor an implementation, just a
    reusable solution to a commonly occurring
    problem.

   May not apply to every application type, only you
    can determine that for your application type.

   MVVM is not required for Silverlight and MVVM,
    but can help where applicable.

   It should not slow down development. If it does,
    re-factor your approach, something else is off.
   Separation of concerns
    ◦ Each component has a specific role. UI Code is not
      mixed with Business logic.
   Natural Patterns for XAML Variants
    ◦ Microsoft’s XAML is designed with MVVM support in
      mind (Key Enabler: DataBinding).
   Enables Developer-Designer Workflow
    ◦ For some shops, this is long time overdue
    ◦ XAML/Expression/Other = Designer, Code=Developer,
      XAML+Code=Integrator
   Better Testability
    ◦ User Interface Business Logic can (and should) be tested.
      Leave UI Component testing to Microsoft or Third Party
      Component Vendors.
   MVVM Components
    ◦ Model
    ◦ View
    ◦ ViewModel

   Each serves a distinct and separate role.
   Components are decoupled from each other:
    ◦ Allowing for components to be swapped
    ◦ Allowing internal implementation to be changed without
      affecting the others
    ◦ Allowing components to be worked on independently
    ◦ Enabling isolated unit testing
   Business Logic and Data
    ◦ Business Objects, Services, Data Access Layers.
   Implements Change Notification for
    properties.
    ◦ INotifyProperyChanged – Individual Property
    ◦ INotifyCollectionChanged – Collections
      Include ObserableCollection in your daily routine.
   Responsible for Model-level validation
    ◦ IDataErrorInfo
   Independently Unit-Testable Code.
   Defines the User Interface Elements (What the
    user sees and interacts with)
    ◦ UserControl, Form, Window, DataTemplate
   Could be a top level component or a sub-
    component
    ◦ Custom Controls, Multiple Tabs, Wizard
   May have some code-behind.
   DataContext is the ViewModel
   Controls bind to ViewModel Public Properties
   Behaviors can invoke ViewModel Public
    methods.
   Responsible for UI Logic and Data for View
   Layer of abstraction between View and Data
    Model.
   Can expose ICommand for Views
   Public Methods are usable by View Behaviors
   Uses DataBinding to maintain and
    communicate state with the View.
   Implements Change Notifications.
   Independently Unit-Testable Code
   Code Behind
    ◦ View.DataContext = ViewModel


   XAML
    ◦ StaticResource
    ◦ ViewModelLocator
    ◦ DataTemplate
   Command
    ◦ Entry into a method – actually a property
    ◦ Implementation of ICommand
      Execute
      CanExecute
      CanExcuteChanged - Event
   RelayCommand
   ViewModel  View


   ViewModel  ViewModel
   MVVM Light – Laurent Bugnion
    ◦ http://mvvmlight.codeplex.com/
   Cinch – Sacha Barber
    ◦ http://cinch.codeplex.com/
   Caliburn – Rob Eisenberg
    ◦ http://caliburn.codeplex.com/
   Jounce – Jeremy Likness
    ◦ http://jounce.codeplex.com/
   MVVM Foundation – Josh Smith
    ◦ http://mvvmfoundation.codeplex.com/
Introduction To MVVM

More Related Content

What's hot

MVVM in iOS presentation
MVVM in iOS presentationMVVM in iOS presentation
MVVM in iOS presentation
G ABHISEK
 
MVVM - Model View ViewModel
MVVM - Model View ViewModelMVVM - Model View ViewModel
MVVM - Model View ViewModel
Dareen Alhiyari
 
MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009
Jonas Follesø
 
MVx patterns in iOS (MVC, MVP, MVVM)
MVx patterns in iOS (MVC, MVP, MVVM)MVx patterns in iOS (MVC, MVP, MVVM)
MVx patterns in iOS (MVC, MVP, MVVM)
Yaroslav Voloshyn
 
Android MVVM
Android MVVMAndroid MVVM
Mvvm basics
Mvvm basicsMvvm basics
Mvvm basics
anusha kadimi
 
Android MVVM
Android MVVMAndroid MVVM
Mvc ppt
Mvc pptMvc ppt
Mvc ppt
Gowarthini
 
Introduction To Model View Presenter
Introduction To Model View PresenterIntroduction To Model View Presenter
Introduction To Model View Presenter
saeed shargi ghazani
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
rainynovember12
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
Betclic Everest Group Tech Team
 
Slide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern ConceptSlide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern Concept
Bayu Wijaya Permana Putra
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
Dominique Cimafranca
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
Jesse Anderson
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
Wayne Tun Myint
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
Emily Bauman
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
Abhishek Yadav
 
Model-View-Controller: Tips&Tricks
Model-View-Controller: Tips&TricksModel-View-Controller: Tips&Tricks
Model-View-Controller: Tips&Tricks
Ciklum Ukraine
 

What's hot (20)

MVVM in iOS presentation
MVVM in iOS presentationMVVM in iOS presentation
MVVM in iOS presentation
 
MVVM - Model View ViewModel
MVVM - Model View ViewModelMVVM - Model View ViewModel
MVVM - Model View ViewModel
 
JSF Presentation"2"
JSF Presentation"2"JSF Presentation"2"
JSF Presentation"2"
 
MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009
 
MVx patterns in iOS (MVC, MVP, MVVM)
MVx patterns in iOS (MVC, MVP, MVVM)MVx patterns in iOS (MVC, MVP, MVVM)
MVx patterns in iOS (MVC, MVP, MVVM)
 
Android MVVM
Android MVVMAndroid MVVM
Android MVVM
 
Mvvm basics
Mvvm basicsMvvm basics
Mvvm basics
 
Android MVVM
Android MVVMAndroid MVVM
Android MVVM
 
Mvc ppt
Mvc pptMvc ppt
Mvc ppt
 
Introduction To Model View Presenter
Introduction To Model View PresenterIntroduction To Model View Presenter
Introduction To Model View Presenter
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Slide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern ConceptSlide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern Concept
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
Model-View-Controller: Tips&Tricks
Model-View-Controller: Tips&TricksModel-View-Controller: Tips&Tricks
Model-View-Controller: Tips&Tricks
 

Viewers also liked

36kr no.94
36kr no.9436kr no.94
36kr no.94Gina Gu
 
Google Business Group Dubai (GBGdxb) - CONNECT - INFORM - INSPIRE
Google Business Group Dubai (GBGdxb) - CONNECT - INFORM - INSPIREGoogle Business Group Dubai (GBGdxb) - CONNECT - INFORM - INSPIRE
Google Business Group Dubai (GBGdxb) - CONNECT - INFORM - INSPIRE
Victor Madueño Calderón
 
CETPA Winter Training Slides
CETPA Winter Training SlidesCETPA Winter Training Slides
CETPA Winter Training Slides
Vikash Kumar
 
Detroit ELEVATE Track 2
Detroit ELEVATE Track 2Detroit ELEVATE Track 2
Detroit ELEVATE Track 2
Joshua Birk
 
Myths[1]final
Myths[1]finalMyths[1]final
Myths[1]finalcsosa311
 
The present-simple-tense342
The present-simple-tense342The present-simple-tense342
The present-simple-tense342miryansalazar
 
задачи управления академическими знаниями
задачи управления академическими знаниямизадачи управления академическими знаниями
задачи управления академическими знаниямиArmen Bagdasaryan
 
Primero scotia presentation final
Primero scotia presentation finalPrimero scotia presentation final
Primero scotia presentation finalprimero_mining
 
10remarkableentrepreneurshipthoughts 131008125313-phpapp01
10remarkableentrepreneurshipthoughts 131008125313-phpapp0110remarkableentrepreneurshipthoughts 131008125313-phpapp01
10remarkableentrepreneurshipthoughts 131008125313-phpapp01Gina Gu
 
Eleve Credentials 2015c
Eleve Credentials 2015cEleve Credentials 2015c
Eleve Credentials 2015cPrince Khanna
 
About iv network hawaii 2
About iv network hawaii 2About iv network hawaii 2
About iv network hawaii 2
Trevor Polischuk
 
Assignment 4 a2
Assignment 4 a2Assignment 4 a2
Assignment 4 a2debbie14
 
36kr no.94
36kr no.9436kr no.94
36kr no.94Gina Gu
 
Tugas rangkuman teknik tenaga listrik
Tugas rangkuman teknik tenaga listrikTugas rangkuman teknik tenaga listrik
Tugas rangkuman teknik tenaga listrikSylvester Saragih
 
Tugas Kelompok II Operasi kominusi dan operasi pengayakan Dalam pencucian bat...
Tugas Kelompok II Operasi kominusi dan operasi pengayakan Dalam pencucian bat...Tugas Kelompok II Operasi kominusi dan operasi pengayakan Dalam pencucian bat...
Tugas Kelompok II Operasi kominusi dan operasi pengayakan Dalam pencucian bat...
Sylvester Saragih
 
Uji Ketercucian dalam pencucian batubara (tugas kelompk I)
Uji Ketercucian dalam pencucian batubara (tugas kelompk I)Uji Ketercucian dalam pencucian batubara (tugas kelompk I)
Uji Ketercucian dalam pencucian batubara (tugas kelompk I)
Sylvester Saragih
 

Viewers also liked (20)

Question 1
Question 1Question 1
Question 1
 
36kr no.94
36kr no.9436kr no.94
36kr no.94
 
Google Business Group Dubai (GBGdxb) - CONNECT - INFORM - INSPIRE
Google Business Group Dubai (GBGdxb) - CONNECT - INFORM - INSPIREGoogle Business Group Dubai (GBGdxb) - CONNECT - INFORM - INSPIRE
Google Business Group Dubai (GBGdxb) - CONNECT - INFORM - INSPIRE
 
CETPA Winter Training Slides
CETPA Winter Training SlidesCETPA Winter Training Slides
CETPA Winter Training Slides
 
Detroit ELEVATE Track 2
Detroit ELEVATE Track 2Detroit ELEVATE Track 2
Detroit ELEVATE Track 2
 
Myths[1]final
Myths[1]finalMyths[1]final
Myths[1]final
 
The present-simple-tense342
The present-simple-tense342The present-simple-tense342
The present-simple-tense342
 
задачи управления академическими знаниями
задачи управления академическими знаниямизадачи управления академическими знаниями
задачи управления академическими знаниями
 
Primero scotia presentation final
Primero scotia presentation finalPrimero scotia presentation final
Primero scotia presentation final
 
3547358436
35473584363547358436
3547358436
 
10remarkableentrepreneurshipthoughts 131008125313-phpapp01
10remarkableentrepreneurshipthoughts 131008125313-phpapp0110remarkableentrepreneurshipthoughts 131008125313-phpapp01
10remarkableentrepreneurshipthoughts 131008125313-phpapp01
 
Eleve Credentials 2015c
Eleve Credentials 2015cEleve Credentials 2015c
Eleve Credentials 2015c
 
About iv network hawaii 2
About iv network hawaii 2About iv network hawaii 2
About iv network hawaii 2
 
Assignment 4 a2
Assignment 4 a2Assignment 4 a2
Assignment 4 a2
 
36kr no.94
36kr no.9436kr no.94
36kr no.94
 
Tugas rangkuman teknik tenaga listrik
Tugas rangkuman teknik tenaga listrikTugas rangkuman teknik tenaga listrik
Tugas rangkuman teknik tenaga listrik
 
Tugas Kelompok II Operasi kominusi dan operasi pengayakan Dalam pencucian bat...
Tugas Kelompok II Operasi kominusi dan operasi pengayakan Dalam pencucian bat...Tugas Kelompok II Operasi kominusi dan operasi pengayakan Dalam pencucian bat...
Tugas Kelompok II Operasi kominusi dan operasi pengayakan Dalam pencucian bat...
 
Modul1
Modul1Modul1
Modul1
 
Uji Ketercucian dalam pencucian batubara (tugas kelompk I)
Uji Ketercucian dalam pencucian batubara (tugas kelompk I)Uji Ketercucian dalam pencucian batubara (tugas kelompk I)
Uji Ketercucian dalam pencucian batubara (tugas kelompk I)
 
Rural mktng
Rural mktngRural mktng
Rural mktng
 

Similar to Introduction To MVVM

MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
Himanshu Dudhat
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
Appfinz Technologies
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
Jitendra Kumar
 
Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernatebwullems
 
реалии использования Mv в i os разработке
реалии использования Mv в i os разработкереалии использования Mv в i os разработке
реалии использования Mv в i os разработке
Provectus
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developersKai Koenig
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
Andrei Popa
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
Flavius-Radu Demian
 
VIPER Architecture
VIPER ArchitectureVIPER Architecture
VIPER ArchitectureAhmed Lotfy
 
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
RapidValue
 
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSSoftware architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Jinkyu Kim
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with Knockoutjs
Nish Anil
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
NSCoder Mexico
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Gill Cleeren
 
Introduction to Knockout Js
Introduction to Knockout JsIntroduction to Knockout Js
Introduction to Knockout Js
Knoldus Inc.
 
Applied MVVM in Windows 8 apps: not your typical MVVM session!
Applied MVVM in Windows 8 apps: not your typical MVVM session!Applied MVVM in Windows 8 apps: not your typical MVVM session!
Applied MVVM in Windows 8 apps: not your typical MVVM session!
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
SUE AGILE MVVM (English)
SUE AGILE MVVM (English)SUE AGILE MVVM (English)
SUE AGILE MVVM (English)
Sabino Labarile
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
Professional Guru
 
Mvvm in the real world tccc10
Mvvm in the real world   tccc10Mvvm in the real world   tccc10
Mvvm in the real world tccc10Bryan Anderson
 

Similar to Introduction To MVVM (20)

MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
 
Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernate
 
реалии использования Mv в i os разработке
реалии использования Mv в i os разработкереалии использования Mv в i os разработке
реалии использования Mv в i os разработке
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developers
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
 
VIPER Architecture
VIPER ArchitectureVIPER Architecture
VIPER Architecture
 
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
 
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSSoftware architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with Knockoutjs
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
 
Introduction to Knockout Js
Introduction to Knockout JsIntroduction to Knockout Js
Introduction to Knockout Js
 
Applied MVVM in Windows 8 apps: not your typical MVVM session!
Applied MVVM in Windows 8 apps: not your typical MVVM session!Applied MVVM in Windows 8 apps: not your typical MVVM session!
Applied MVVM in Windows 8 apps: not your typical MVVM session!
 
SUE AGILE MVVM (English)
SUE AGILE MVVM (English)SUE AGILE MVVM (English)
SUE AGILE MVVM (English)
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Mvvm in the real world tccc10
Mvvm in the real world   tccc10Mvvm in the real world   tccc10
Mvvm in the real world tccc10
 

Recently uploaded

Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 

Recently uploaded (20)

Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 

Introduction To MVVM

  • 1. Boulos Dib Independent Consultant Napeague Inc. February 15, 2011
  • 2. A pattern that describes how UI components interact with other application code.  Associated with Microsoft XAML platforms (Silverlight, WPF)  MVVM is not complicated, really!!!, simple is good.
  • 3. Not a framework nor an implementation, just a reusable solution to a commonly occurring problem.  May not apply to every application type, only you can determine that for your application type.  MVVM is not required for Silverlight and MVVM, but can help where applicable.  It should not slow down development. If it does, re-factor your approach, something else is off.
  • 4. Separation of concerns ◦ Each component has a specific role. UI Code is not mixed with Business logic.  Natural Patterns for XAML Variants ◦ Microsoft’s XAML is designed with MVVM support in mind (Key Enabler: DataBinding).  Enables Developer-Designer Workflow ◦ For some shops, this is long time overdue ◦ XAML/Expression/Other = Designer, Code=Developer, XAML+Code=Integrator  Better Testability ◦ User Interface Business Logic can (and should) be tested. Leave UI Component testing to Microsoft or Third Party Component Vendors.
  • 5. MVVM Components ◦ Model ◦ View ◦ ViewModel  Each serves a distinct and separate role.  Components are decoupled from each other: ◦ Allowing for components to be swapped ◦ Allowing internal implementation to be changed without affecting the others ◦ Allowing components to be worked on independently ◦ Enabling isolated unit testing
  • 6. Business Logic and Data ◦ Business Objects, Services, Data Access Layers.  Implements Change Notification for properties. ◦ INotifyProperyChanged – Individual Property ◦ INotifyCollectionChanged – Collections  Include ObserableCollection in your daily routine.  Responsible for Model-level validation ◦ IDataErrorInfo  Independently Unit-Testable Code.
  • 7. Defines the User Interface Elements (What the user sees and interacts with) ◦ UserControl, Form, Window, DataTemplate  Could be a top level component or a sub- component ◦ Custom Controls, Multiple Tabs, Wizard  May have some code-behind.  DataContext is the ViewModel  Controls bind to ViewModel Public Properties  Behaviors can invoke ViewModel Public methods.
  • 8. Responsible for UI Logic and Data for View  Layer of abstraction between View and Data Model.  Can expose ICommand for Views  Public Methods are usable by View Behaviors  Uses DataBinding to maintain and communicate state with the View.  Implements Change Notifications.  Independently Unit-Testable Code
  • 9. Code Behind ◦ View.DataContext = ViewModel  XAML ◦ StaticResource ◦ ViewModelLocator ◦ DataTemplate
  • 10. Command ◦ Entry into a method – actually a property ◦ Implementation of ICommand  Execute  CanExecute  CanExcuteChanged - Event  RelayCommand
  • 11. ViewModel  View  ViewModel  ViewModel
  • 12. MVVM Light – Laurent Bugnion ◦ http://mvvmlight.codeplex.com/  Cinch – Sacha Barber ◦ http://cinch.codeplex.com/  Caliburn – Rob Eisenberg ◦ http://caliburn.codeplex.com/  Jounce – Jeremy Likness ◦ http://jounce.codeplex.com/  MVVM Foundation – Josh Smith ◦ http://mvvmfoundation.codeplex.com/