SlideShare uma empresa Scribd logo
1 de 17
/* Life runs on code */
UNDERSTANDING
THE MODEL-VIEW-
VIEWMODEL
PATTERN
Kamalakannan Annamalai
Senior Software Engineer
Ilink-Systems
http://kamalakannana.wordpress.com
WHAT IS MVVM?
• A weird acronym
– Model – View – ViewModel
• Woven into WPF/SL/WP
• Some confusion:
– MVVM is really just the pattern
– The rest are helpers, practices, etc.
• Why does MVVM pattern is best for
WPF/SL/WP?
-WPF/SL/WP Controls are developed using
MVVM internally.
THE MVC PATTERN
Model View
Controller
THE PASSIVE VIEW PATTERN
Model View
Controller
THE PRESENTATION MODEL PATTERN
Model View
Presentation
Model
(ViewModel)
DataBinding
BLENDABILITY
• Testability, Maintainability, Blendability
• “The ability to be edited in Blend”
–(and Visual Studio designer…)
• Differentiate code in design and runtime
• Create design time data
/* Life runs on code */ 7
BRIDGING THE GAP
/* Life runs on code */ 8
View
ViewModel
DataBinding Commands Messages
Model
BRIDGING THE GAP
/* Life runs on code */ 9
View
ViewModel
View
ViewModel
View
ViewModel
DEMO
© 2010 IdentityMine Inc. All Rights Reserved. 10Page:
Hello MVVM
(and Hi Blend)
COMMANDS
• “Point of entry” for a method
• Can be data bound
• ICommand interface
–Execute method
–CanExecute method
–CanExecuteChanged event
/* Life runs on code */ 11
FLAWS OF MVVM
•
–
–
•
•
•
DEBUNK THE MYTHS
• “No code in the code behind”
– “If you put code in the View's code-behind, the
MVVM police will take your family away”
– “No need for converters”
• “MVVM is suitable for big projects”
• “MVVM costs performance”
• “MVVM is complex / makes my head hurt”
/* Life runs on code */ 13
DEBUNK THE MYTHS
• “I don’t need separation because I don’t
have a designer”
• “You cannot use MVVM with other
patterns”
• “MVVM will make you rich and attractive”
/* Life runs on code */ 14
MVVM LIGHT TOOLKIT
• “Breaking the monotony”
• http://www.galasoft.ch/mvvm/getstarted
• http://mvvmlight.codeplex.com
• Keep it small
• Keep it simple
/* Life runs on code */ 15
MVVM LIGHT TOOLS
• Project templates (VS + Blend)
• Item templates (VS + Blend)
• Code snippets
/* Life runs on code */ 16
THANKS!

Mais conteúdo relacionado

Mais procurados

Web Development, Константин Пелиховский (PM, 111PIX UA)
Web Development, Константин Пелиховский (PM, 111PIX UA)Web Development, Константин Пелиховский (PM, 111PIX UA)
Web Development, Константин Пелиховский (PM, 111PIX UA)111PIX UA
 
Jump start php environment
Jump start php environmentJump start php environment
Jump start php environmentAdrian Sandu
 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationJonny Allbut
 
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...Jeavon Leopold
 
React - поглянемо по іншому на V в MVC
React - поглянемо по іншому на V в MVCReact - поглянемо по іншому на V в MVC
React - поглянемо по іншому на V в MVCStfalcon Meetups
 
Angels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusiveAngels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusiveChris Mills
 
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS FrameworksDon’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS FrameworksWebVisions
 
Scaling WooCommerce - WordCamp Mumbai 2016
Scaling WooCommerce - WordCamp Mumbai 2016Scaling WooCommerce - WordCamp Mumbai 2016
Scaling WooCommerce - WordCamp Mumbai 2016rtCamp
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02Paul Bele
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) Sascha Sambale
 
Developing WordPress Plugins Using the MVC Methodology
Developing WordPress Plugins Using the MVC MethodologyDeveloping WordPress Plugins Using the MVC Methodology
Developing WordPress Plugins Using the MVC MethodologyNate Allen
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the WebCodeValue
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationBrad Beiermann
 
Introduction to Web Development Career
Introduction to Web Development CareerIntroduction to Web Development Career
Introduction to Web Development CareerEunus Hosen
 

Mais procurados (20)

Web Development
Web DevelopmentWeb Development
Web Development
 
Web Development, Константин Пелиховский (PM, 111PIX UA)
Web Development, Константин Пелиховский (PM, 111PIX UA)Web Development, Константин Пелиховский (PM, 111PIX UA)
Web Development, Константин Пелиховский (PM, 111PIX UA)
 
Jump start php environment
Jump start php environmentJump start php environment
Jump start php environment
 
Mini-Training: NDepend
Mini-Training: NDependMini-Training: NDepend
Mini-Training: NDepend
 
Fork CMS
Fork CMSFork CMS
Fork CMS
 
Wp7 + mvvm
Wp7 + mvvmWp7 + mvvm
Wp7 + mvvm
 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow Presentation
 
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
 
React - поглянемо по іншому на V в MVC
React - поглянемо по іншому на V в MVCReact - поглянемо по іншому на V в MVC
React - поглянемо по іншому на V в MVC
 
Angels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusiveAngels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusive
 
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS FrameworksDon’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
 
Scaling WooCommerce - WordCamp Mumbai 2016
Scaling WooCommerce - WordCamp Mumbai 2016Scaling WooCommerce - WordCamp Mumbai 2016
Scaling WooCommerce - WordCamp Mumbai 2016
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02
 
Hot Module Replacement
Hot Module ReplacementHot Module Replacement
Hot Module Replacement
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
 
Developing WordPress Plugins Using the MVC Methodology
Developing WordPress Plugins Using the MVC MethodologyDeveloping WordPress Plugins Using the MVC Methodology
Developing WordPress Plugins Using the MVC Methodology
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the Web
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction Presentation
 
Introduction to Web Development Career
Introduction to Web Development CareerIntroduction to Web Development Career
Introduction to Web Development Career
 
Into to Webassmbly
Into to WebassmblyInto to Webassmbly
Into to Webassmbly
 

Destaque

INFOGRAFÍA MÉTODOS ANTICONCEPTIVOS
INFOGRAFÍA MÉTODOS ANTICONCEPTIVOSINFOGRAFÍA MÉTODOS ANTICONCEPTIVOS
INFOGRAFÍA MÉTODOS ANTICONCEPTIVOSDayanne Sugahara
 
Designing Teams for Emerging Challenges
Designing Teams for Emerging ChallengesDesigning Teams for Emerging Challenges
Designing Teams for Emerging ChallengesAaron Irizarry
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesNed Potter
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017Drift
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

Destaque (6)

INFOGRAFÍA MÉTODOS ANTICONCEPTIVOS
INFOGRAFÍA MÉTODOS ANTICONCEPTIVOSINFOGRAFÍA MÉTODOS ANTICONCEPTIVOS
INFOGRAFÍA MÉTODOS ANTICONCEPTIVOS
 
Designing Teams for Emerging Challenges
Designing Teams for Emerging ChallengesDesigning Teams for Emerging Challenges
Designing Teams for Emerging Challenges
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and Archives
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Semelhante a Windows Phone App with MVVM design patten

Understanding The MVVM Pattern (TechDays Belgium)
Understanding The MVVM Pattern (TechDays Belgium)Understanding The MVVM Pattern (TechDays Belgium)
Understanding The MVVM Pattern (TechDays Belgium)Laurent Bugnion
 
A Smooth Transition to HTML5
A Smooth Transition to HTML5A Smooth Transition to HTML5
A Smooth Transition to HTML5Chris Bannon
 
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databindingDev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databindingStuart Lodge
 
Wpug mvvm and data binding
Wpug   mvvm and data bindingWpug   mvvm and data binding
Wpug mvvm and data bindingStuart Lodge
 
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 2018Ortus Solutions, Corp
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Gill Cleeren
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesQamar Abbas
 
MVVM - Model View ViewModel
MVVM - Model View ViewModelMVVM - Model View ViewModel
MVVM - Model View ViewModelDareen Alhiyari
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMChris Bannon
 
Model View Madness
Model View MadnessModel View Madness
Model View MadnessMike Wilcox
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoMagento Dev
 
IamLUG2013 Connections Administration
IamLUG2013 Connections AdministrationIamLUG2013 Connections Administration
IamLUG2013 Connections AdministrationVictor Toal
 
Automation CI CD with Gitlab, Java, docker on Hidora - Jelastic
Automation CI CD with Gitlab, Java, docker on Hidora - JelasticAutomation CI CD with Gitlab, Java, docker on Hidora - Jelastic
Automation CI CD with Gitlab, Java, docker on Hidora - JelasticHidora
 
Prism library and MVVM
Prism library and MVVMPrism library and MVVM
Prism library and MVVMJiri Danihelka
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMMudasir Qazi
 

Semelhante a Windows Phone App with MVVM design patten (20)

Adopting MVVM
Adopting MVVMAdopting MVVM
Adopting MVVM
 
Understanding The MVVM Pattern (TechDays Belgium)
Understanding The MVVM Pattern (TechDays Belgium)Understanding The MVVM Pattern (TechDays Belgium)
Understanding The MVVM Pattern (TechDays Belgium)
 
A Smooth Transition to HTML5
A Smooth Transition to HTML5A Smooth Transition to HTML5
A Smooth Transition to HTML5
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databindingDev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
 
MVVM and Prism
MVVM and PrismMVVM and Prism
MVVM and Prism
 
Wpug mvvm and data binding
Wpug   mvvm and data bindingWpug   mvvm and data binding
Wpug mvvm and data binding
 
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
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
 
Getting started with angular js
Getting started with angular jsGetting started with angular js
Getting started with angular js
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
MVVM - Model View ViewModel
MVVM - Model View ViewModelMVVM - Model View ViewModel
MVVM - Model View ViewModel
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVM
 
Model View Madness
Model View MadnessModel View Madness
Model View Madness
 
Knockout js
Knockout jsKnockout js
Knockout js
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
 
IamLUG2013 Connections Administration
IamLUG2013 Connections AdministrationIamLUG2013 Connections Administration
IamLUG2013 Connections Administration
 
Automation CI CD with Gitlab, Java, docker on Hidora - Jelastic
Automation CI CD with Gitlab, Java, docker on Hidora - JelasticAutomation CI CD with Gitlab, Java, docker on Hidora - Jelastic
Automation CI CD with Gitlab, Java, docker on Hidora - Jelastic
 
Prism library and MVVM
Prism library and MVVMPrism library and MVVM
Prism library and MVVM
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Windows Phone App with MVVM design patten

  • 1. /* Life runs on code */
  • 2. UNDERSTANDING THE MODEL-VIEW- VIEWMODEL PATTERN Kamalakannan Annamalai Senior Software Engineer Ilink-Systems http://kamalakannana.wordpress.com
  • 3. WHAT IS MVVM? • A weird acronym – Model – View – ViewModel • Woven into WPF/SL/WP • Some confusion: – MVVM is really just the pattern – The rest are helpers, practices, etc. • Why does MVVM pattern is best for WPF/SL/WP? -WPF/SL/WP Controls are developed using MVVM internally.
  • 4. THE MVC PATTERN Model View Controller
  • 5. THE PASSIVE VIEW PATTERN Model View Controller
  • 6. THE PRESENTATION MODEL PATTERN Model View Presentation Model (ViewModel) DataBinding
  • 7. BLENDABILITY • Testability, Maintainability, Blendability • “The ability to be edited in Blend” –(and Visual Studio designer…) • Differentiate code in design and runtime • Create design time data /* Life runs on code */ 7
  • 8. BRIDGING THE GAP /* Life runs on code */ 8 View ViewModel DataBinding Commands Messages Model
  • 9. BRIDGING THE GAP /* Life runs on code */ 9 View ViewModel View ViewModel View ViewModel
  • 10. DEMO © 2010 IdentityMine Inc. All Rights Reserved. 10Page: Hello MVVM (and Hi Blend)
  • 11. COMMANDS • “Point of entry” for a method • Can be data bound • ICommand interface –Execute method –CanExecute method –CanExecuteChanged event /* Life runs on code */ 11
  • 13. DEBUNK THE MYTHS • “No code in the code behind” – “If you put code in the View's code-behind, the MVVM police will take your family away” – “No need for converters” • “MVVM is suitable for big projects” • “MVVM costs performance” • “MVVM is complex / makes my head hurt” /* Life runs on code */ 13
  • 14. DEBUNK THE MYTHS • “I don’t need separation because I don’t have a designer” • “You cannot use MVVM with other patterns” • “MVVM will make you rich and attractive” /* Life runs on code */ 14
  • 15. MVVM LIGHT TOOLKIT • “Breaking the monotony” • http://www.galasoft.ch/mvvm/getstarted • http://mvvmlight.codeplex.com • Keep it small • Keep it simple /* Life runs on code */ 15
  • 16. MVVM LIGHT TOOLS • Project templates (VS + Blend) • Item templates (VS + Blend) • Code snippets /* Life runs on code */ 16