SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente (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
 

Destacado

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 - INSPIREVictor Madueño Calderón
 
CETPA Winter Training Slides
CETPA Winter Training SlidesCETPA Winter Training Slides
CETPA Winter Training SlidesVikash Kumar
 
Detroit ELEVATE Track 2
Detroit ELEVATE Track 2Detroit ELEVATE Track 2
Detroit ELEVATE Track 2Joshua 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
 
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
 

Destacado (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 a Introduction To MVVM

Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: AndroidJitendra 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 MVVMAndrei Popa
 
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 iOSJinkyu Kim
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsNish Anil
 
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 JsKnoldus Inc.
 
SUE AGILE MVVM (English)
SUE AGILE MVVM (English)SUE AGILE MVVM (English)
SUE AGILE MVVM (English)Sabino Labarile
 
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 a Introduction To MVVM (20)

MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
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
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

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/