SlideShare a Scribd company logo
MVVM SESSION
CONTENTS 
• Prerequisites 
• What is MVVM? 
• Elements of MVVM 
• Architectural Diagram 
• Why we need MVVM? 
• What is INotifyPropertyChanged Interface? 
• What is Icommand Interface? 
• Pros & Cons 
• Practical Implementation 
• Supported Frameworks & References
BASICS AND KEY POINTS TO KNOW 
• Xaml 
• Data Binding 
• Key Concepts 
1.observablecollection 
2.INotifyPropertyChanged 
3.ICommand
MVVM(MODEL, VIEW, VIEWMODEL) 
• is an architectural pattern created by John Gossman from WPF 
team 
• is a variation of MVC pattern 
• Also known as Presentation model 
• Woven into WPF/SL 
• WPF Data Binding & Commanding
ELEMENTS OF MVVM 
• Model : Business Logic 
• View : UI logic 
• ViewModel : Presentational Logic
ARCHITECTURAL DIAGRAM
NEED OF MVVM 
To Avoid Glue Code
RULES OF MVVM COMPLIANT 
APPLICATIONS 
• Minimum Code Behind (Recommended No code Behind) 
• Events as Commands 
• ViewModel as DataContext 
• Design View and ViewModel Independently
INOTIFYPROPERTYCHANGED 
• any class that implements this interface, notifies any listeners 
when a property has changed. 
• Notifies clients that a property value has changed. 
• To implement INotifyPropertyChanged you need to declare 
the PropertyChanged event and create 
the OnPropertyChanged method. Then for each property you 
want change notifications for, you 
call OnPropertyChanged whenever the property is updated.
ICOMMAND 
• Methods 
1.CanExecute (Defines the method that determines whether the 
command can execute in its current state.) 
2.Execute(Defines the method to be called when the command 
is invoked.) 
• Events 
1.CanExecuteChanged (Occurs when changes occur that affect 
whether or not the command should execute.)
OBSERVABLECOLLECTION 
An ObservableCollection is a dynamic collection of objects of a given type. 
When an object is added to or removed from an observable collection, the UI 
is automatically updated. 
WPF automatically adds a CollectionChanged event handler to the 
ObservableCollecion's events. 
public class ObservableCollection<T> : Collection<T>, 
INotifyCollectionChanged, INotifyPropertyChanged
PROS & CONS 
• Cons 
Ease of Maintainance 
Ease of Testing 
Flexibility 
Re Usability 
Low Degree of coupling 
• Pros 
Not Suitable for Simple Applications (Need best coding practices and standards) 
Not a standardized one , Everyone follows their own flavours
PRACTICAL IMPLEMENTATION
SUPPORTED FRAMEWORKS AND 
REFERENCES 
• WPF Team : MVVM Toolkit 
• MS Pattern and Practice Team : Composite WPF (Prism) 
• Josh Smith. "MVVM Foundation" 
• Sacha Barber. "Cinch." 
• Karl Shifflett. "Ocean" 
• Laurent Bugnion. "MVVM Light Toolkit" 
• Lester Lobo. "CoreMVVM" 
• Rob Eisenberg. "Caliburn" 
• William e Kempf. "Onyx" 
• Peter O’Hanlon. "GoldLight" 
• jbe. "WPF Application Framework (WAF)" 
• Paul Stovel : MacroModels 
References: 
http://www.codeproject.com/Articles/659614/MVVM-in-Depth 
http://www.codeproject.com/Articles/165368/WPF-MVVM-Quick-Start-Tutorial (For Practical 
Implementation)

More Related Content

What's hot

iOS architecture patterns
iOS architecture patternsiOS architecture patterns
iOS architecture patterns
allanh0526
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best Practices
Jean-Luc David
 
Clean architecture: Android
Clean architecture: AndroidClean architecture: Android
Clean architecture: Androidintive
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
Roc Boronat
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
Irwansyah Irwansyah
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
Shahzad
 
MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
Himanshu Dudhat
 
Architecting iOS Project
Architecting iOS ProjectArchitecting iOS Project
Architecting iOS Project
Massimo Oliviero
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
ASG
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
Knoldus Inc.
 
Dependency Inversion Principle
Dependency Inversion PrincipleDependency Inversion Principle
Dependency Inversion Principle
Shahriar Hyder
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
Dipika Wadhvani
 
Microservices with Minimal APi and .NET 6
Microservices with Minimal APi and .NET 6Microservices with Minimal APi and .NET 6
Microservices with Minimal APi and .NET 6
Miguel Angel Teheran Garcia
 
Design patterns in android
Design patterns in androidDesign patterns in android
Design patterns in android
Zahra Heydari
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingMulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handling
Manish Kumar Yadav
 
SOLID Principles and The Clean Architecture
SOLID Principles and The Clean ArchitectureSOLID Principles and The Clean Architecture
SOLID Principles and The Clean Architecture
Mohamed Galal
 
Design pattern in android
Design pattern in androidDesign pattern in android
Design pattern in androidJay Kumarr
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
Ni
 
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
 

What's hot (20)

iOS architecture patterns
iOS architecture patternsiOS architecture patterns
iOS architecture patterns
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best Practices
 
Clean architecture: Android
Clean architecture: AndroidClean architecture: Android
Clean architecture: Android
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Mvc, mvp, mvvm...
Mvc, mvp, mvvm...Mvc, mvp, mvvm...
Mvc, mvp, mvvm...
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
Architecting iOS Project
Architecting iOS ProjectArchitecting iOS Project
Architecting iOS Project
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
Dependency Inversion Principle
Dependency Inversion PrincipleDependency Inversion Principle
Dependency Inversion Principle
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
Microservices with Minimal APi and .NET 6
Microservices with Minimal APi and .NET 6Microservices with Minimal APi and .NET 6
Microservices with Minimal APi and .NET 6
 
Design patterns in android
Design patterns in androidDesign patterns in android
Design patterns in android
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingMulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handling
 
SOLID Principles and The Clean Architecture
SOLID Principles and The Clean ArchitectureSOLID Principles and The Clean Architecture
SOLID Principles and The Clean Architecture
 
Design pattern in android
Design pattern in androidDesign pattern in android
Design pattern in android
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
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
 

Viewers also liked

MVVM Light for UWP
MVVM Light for UWPMVVM Light for UWP
MVVM Light for UWP
Robert Iagar
 
MVVM frameworks - MvvmCross
MVVM frameworks - MvvmCrossMVVM frameworks - MvvmCross
MVVM frameworks - MvvmCross
Flavius-Radu Demian
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0
Sarah Dutkiewicz
 
StarEast2013 - kanban for test teams
StarEast2013 - kanban for test teamsStarEast2013 - kanban for test teams
StarEast2013 - kanban for test teams
Derk-Jan de Grood
 
Introduction to kanban
Introduction to kanbanIntroduction to kanban
Introduction to kanban
Robert Dempsey
 
The Dark Side of Code Metrics
The Dark Side of Code MetricsThe Dark Side of Code Metrics
The Dark Side of Code MetricsDonald Belcham
 
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrhTransparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Hichem Chehida
 
How to Get Started with Kanban, and Why
How to Get Started with Kanban, and WhyHow to Get Started with Kanban, and Why
How to Get Started with Kanban, and Why
Ingvald Skaug
 
Combating entropy in business
Combating entropy in businessCombating entropy in business
Combating entropy in business
Jose V. Alcedo, M.B.A.,G.R.I., Broker,Author
 
Maersk Line's Agile Journey LESS 2012
Maersk Line's Agile Journey LESS 2012 Maersk Line's Agile Journey LESS 2012
Maersk Line's Agile Journey LESS 2012 OzlemYuce
 
Spec flow – functional testing made easy
Spec flow – functional testing made easySpec flow – functional testing made easy
Spec flow – functional testing made easyPaul Stack
 
Identifying and managing waste in software product development
Identifying and managing waste in software product developmentIdentifying and managing waste in software product development
Identifying and managing waste in software product development
Ken Power
 
Kanban 101 - 3 - Kanban Essentials
Kanban 101 - 3 - Kanban EssentialsKanban 101 - 3 - Kanban Essentials
Kanban 101 - 3 - Kanban Essentials
Michael Sahota
 
Seven Types Of Waste: Setting Priorities For Improvement Discussion
Seven Types Of Waste: Setting Priorities For Improvement DiscussionSeven Types Of Waste: Setting Priorities For Improvement Discussion
Seven Types Of Waste: Setting Priorities For Improvement Discussion
Kathy McShea
 
Scrum-ban in practice
Scrum-ban in practiceScrum-ban in practice
Scrum-ban in practice
Armands Baranovskis
 
Kanban 101 - 1 - Perfection, Waste and Value Stream Mapping
Kanban 101 - 1 - Perfection, Waste and Value Stream MappingKanban 101 - 1 - Perfection, Waste and Value Stream Mapping
Kanban 101 - 1 - Perfection, Waste and Value Stream Mapping
Michael Sahota
 
Alternate Hourly Lean Introduction
Alternate Hourly Lean IntroductionAlternate Hourly Lean Introduction
Alternate Hourly Lean Introduction
Harold Philbrick
 
Kanban Basics for Beginners
Kanban Basics for BeginnersKanban Basics for Beginners
Kanban Basics for Beginners
Zsolt Fabok
 

Viewers also liked (20)

MVVM Light for UWP
MVVM Light for UWPMVVM Light for UWP
MVVM Light for UWP
 
MVVM frameworks - MvvmCross
MVVM frameworks - MvvmCrossMVVM frameworks - MvvmCross
MVVM frameworks - MvvmCross
 
Kanban in sw development
Kanban in sw developmentKanban in sw development
Kanban in sw development
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0
 
StarEast2013 - kanban for test teams
StarEast2013 - kanban for test teamsStarEast2013 - kanban for test teams
StarEast2013 - kanban for test teams
 
Introduction to kanban
Introduction to kanbanIntroduction to kanban
Introduction to kanban
 
The Dark Side of Code Metrics
The Dark Side of Code MetricsThe Dark Side of Code Metrics
The Dark Side of Code Metrics
 
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrhTransparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
 
How to Get Started with Kanban, and Why
How to Get Started with Kanban, and WhyHow to Get Started with Kanban, and Why
How to Get Started with Kanban, and Why
 
Combating entropy in business
Combating entropy in businessCombating entropy in business
Combating entropy in business
 
Maersk Line's Agile Journey LESS 2012
Maersk Line's Agile Journey LESS 2012 Maersk Line's Agile Journey LESS 2012
Maersk Line's Agile Journey LESS 2012
 
Spec flow – functional testing made easy
Spec flow – functional testing made easySpec flow – functional testing made easy
Spec flow – functional testing made easy
 
Identifying and managing waste in software product development
Identifying and managing waste in software product developmentIdentifying and managing waste in software product development
Identifying and managing waste in software product development
 
Kanban 101 - 3 - Kanban Essentials
Kanban 101 - 3 - Kanban EssentialsKanban 101 - 3 - Kanban Essentials
Kanban 101 - 3 - Kanban Essentials
 
Seven Types Of Waste: Setting Priorities For Improvement Discussion
Seven Types Of Waste: Setting Priorities For Improvement DiscussionSeven Types Of Waste: Setting Priorities For Improvement Discussion
Seven Types Of Waste: Setting Priorities For Improvement Discussion
 
Scrum-ban in practice
Scrum-ban in practiceScrum-ban in practice
Scrum-ban in practice
 
Waste Elimination
Waste  EliminationWaste  Elimination
Waste Elimination
 
Kanban 101 - 1 - Perfection, Waste and Value Stream Mapping
Kanban 101 - 1 - Perfection, Waste and Value Stream MappingKanban 101 - 1 - Perfection, Waste and Value Stream Mapping
Kanban 101 - 1 - Perfection, Waste and Value Stream Mapping
 
Alternate Hourly Lean Introduction
Alternate Hourly Lean IntroductionAlternate Hourly Lean Introduction
Alternate Hourly Lean Introduction
 
Kanban Basics for Beginners
Kanban Basics for BeginnersKanban Basics for Beginners
Kanban Basics for Beginners
 

Similar to Mvvm basics

Knockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockoutKnockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockoutAndoni Arroyo
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
Qamar Abbas
 
Adopting MVVM
Adopting MVVMAdopting MVVM
Adopting MVVM
John Cumming
 
MVVM and Prism
MVVM and PrismMVVM and Prism
MVVM and Prism
Bilal Ahmed
 
Mock Objects, Design and Dependency Inversion Principle
Mock Objects, Design and Dependency Inversion PrincipleMock Objects, Design and Dependency Inversion Principle
Mock Objects, Design and Dependency Inversion PrincipleP Heinonen
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
Abhishek Yadav
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
Giovanni Scerra ☃
 
King Tut Architecture
King Tut ArchitectureKing Tut Architecture
King Tut Architecture
Gary Pedretti
 
Refactoring Legacy Web Forms for Test Automation
Refactoring Legacy Web Forms for Test AutomationRefactoring Legacy Web Forms for Test Automation
Refactoring Legacy Web Forms for Test Automation
Stephen Fuqua
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application Guidance
Our Community Exchange LLC
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29
Nitin Bhojwani
 
Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fairTech_MX
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Phil Leggetter
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
Phil Leggetter
 
Reactive Cocoa && MVVM
Reactive Cocoa && MVVMReactive Cocoa && MVVM
Reactive Cocoa && MVVM
Hai Feng Kao
 
ASP.NET MVC Best Practices malisa ncube
ASP.NET MVC Best Practices   malisa ncubeASP.NET MVC Best Practices   malisa ncube
ASP.NET MVC Best Practices malisa ncube
Malisa Ncube
 
Real World Windows Phone Development
Real World Windows Phone DevelopmentReal World Windows Phone Development
Real World Windows Phone Development
Igor Kulman
 
Angular js 心得分享
Angular js 心得分享Angular js 心得分享
Angular js 心得分享Vincent Chang
 
Revamp your monolith with Hierarchical MVC at CFSummit 2018
Revamp your monolith with Hierarchical MVC at CFSummit 2018Revamp your monolith with Hierarchical MVC at CFSummit 2018
Revamp your monolith with Hierarchical MVC at CFSummit 2018
Ortus Solutions, Corp
 

Similar to Mvvm basics (20)

Knockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockoutKnockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockout
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Adopting MVVM
Adopting MVVMAdopting MVVM
Adopting MVVM
 
MVVM and Prism
MVVM and PrismMVVM and Prism
MVVM and Prism
 
Mock Objects, Design and Dependency Inversion Principle
Mock Objects, Design and Dependency Inversion PrincipleMock Objects, Design and Dependency Inversion Principle
Mock Objects, Design and Dependency Inversion Principle
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
King Tut Architecture
King Tut ArchitectureKing Tut Architecture
King Tut Architecture
 
Refactoring Legacy Web Forms for Test Automation
Refactoring Legacy Web Forms for Test AutomationRefactoring Legacy Web Forms for Test Automation
Refactoring Legacy Web Forms for Test Automation
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application Guidance
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29
 
Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fair
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
 
Reactive Cocoa && MVVM
Reactive Cocoa && MVVMReactive Cocoa && MVVM
Reactive Cocoa && MVVM
 
ASP.NET MVC Best Practices malisa ncube
ASP.NET MVC Best Practices   malisa ncubeASP.NET MVC Best Practices   malisa ncube
ASP.NET MVC Best Practices malisa ncube
 
Real World Windows Phone Development
Real World Windows Phone DevelopmentReal World Windows Phone Development
Real World Windows Phone Development
 
Angular js 心得分享
Angular js 心得分享Angular js 心得分享
Angular js 心得分享
 
Revamp your monolith with Hierarchical MVC at CFSummit 2018
Revamp your monolith with Hierarchical MVC at CFSummit 2018Revamp your monolith with Hierarchical MVC at CFSummit 2018
Revamp your monolith with Hierarchical MVC at CFSummit 2018
 

Recently uploaded

Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 

Recently uploaded (20)

Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 

Mvvm basics

  • 2. CONTENTS • Prerequisites • What is MVVM? • Elements of MVVM • Architectural Diagram • Why we need MVVM? • What is INotifyPropertyChanged Interface? • What is Icommand Interface? • Pros & Cons • Practical Implementation • Supported Frameworks & References
  • 3. BASICS AND KEY POINTS TO KNOW • Xaml • Data Binding • Key Concepts 1.observablecollection 2.INotifyPropertyChanged 3.ICommand
  • 4. MVVM(MODEL, VIEW, VIEWMODEL) • is an architectural pattern created by John Gossman from WPF team • is a variation of MVC pattern • Also known as Presentation model • Woven into WPF/SL • WPF Data Binding & Commanding
  • 5. ELEMENTS OF MVVM • Model : Business Logic • View : UI logic • ViewModel : Presentational Logic
  • 7. NEED OF MVVM To Avoid Glue Code
  • 8. RULES OF MVVM COMPLIANT APPLICATIONS • Minimum Code Behind (Recommended No code Behind) • Events as Commands • ViewModel as DataContext • Design View and ViewModel Independently
  • 9. INOTIFYPROPERTYCHANGED • any class that implements this interface, notifies any listeners when a property has changed. • Notifies clients that a property value has changed. • To implement INotifyPropertyChanged you need to declare the PropertyChanged event and create the OnPropertyChanged method. Then for each property you want change notifications for, you call OnPropertyChanged whenever the property is updated.
  • 10. ICOMMAND • Methods 1.CanExecute (Defines the method that determines whether the command can execute in its current state.) 2.Execute(Defines the method to be called when the command is invoked.) • Events 1.CanExecuteChanged (Occurs when changes occur that affect whether or not the command should execute.)
  • 11. OBSERVABLECOLLECTION An ObservableCollection is a dynamic collection of objects of a given type. When an object is added to or removed from an observable collection, the UI is automatically updated. WPF automatically adds a CollectionChanged event handler to the ObservableCollecion's events. public class ObservableCollection<T> : Collection<T>, INotifyCollectionChanged, INotifyPropertyChanged
  • 12. PROS & CONS • Cons Ease of Maintainance Ease of Testing Flexibility Re Usability Low Degree of coupling • Pros Not Suitable for Simple Applications (Need best coding practices and standards) Not a standardized one , Everyone follows their own flavours
  • 14. SUPPORTED FRAMEWORKS AND REFERENCES • WPF Team : MVVM Toolkit • MS Pattern and Practice Team : Composite WPF (Prism) • Josh Smith. "MVVM Foundation" • Sacha Barber. "Cinch." • Karl Shifflett. "Ocean" • Laurent Bugnion. "MVVM Light Toolkit" • Lester Lobo. "CoreMVVM" • Rob Eisenberg. "Caliburn" • William e Kempf. "Onyx" • Peter O’Hanlon. "GoldLight" • jbe. "WPF Application Framework (WAF)" • Paul Stovel : MacroModels References: http://www.codeproject.com/Articles/659614/MVVM-in-Depth http://www.codeproject.com/Articles/165368/WPF-MVVM-Quick-Start-Tutorial (For Practical Implementation)