SlideShare a Scribd company logo
1 of 11
MVVM from Scratch using Silverlight - By Kunal Chowdhury
Agenda What is MVVM? Why to use MVVM? Events Replacement Demo MVVM Guidelines
What is MVVM? MVVM stands for: (M)odel (V)iew (V)iew (M)odel View ViewModel Model
What is MVVM? (contd.) View ViewModel Model
Why to use MVVM? Loose coupling between the Model, View and ViewModel Create almost 0 code behind lines Reusability of the ViewModel code Unit testing of the ViewModel independently Designers can work in the View without messing up the logic Would benefit from a root ViewModel class for the state management
Event Replacement Notification Command Event Aggregation Behavior
Demo
MVVM Guidelines Separate your View and ViewModel Don’t write any code in .xaml.cs unless require Try to use the Behavior whenever require. This will make sure that, your code behind is clean Your ViewModel should not know it’s View ViewModel should not have any instance of UIElements Expose properties and Bind them in the View
Resources Silverlight Articles –http://tinyurl.com/silverlightarticles MVVM Articles - http://tinyurl.com/mvvmarticles Silverlight Zone – http://www.silverlight-zone.com Silverlight.Net – http://www.silverlight.net
Questions and Answers
Thank you

More Related Content

Viewers also liked

Online Divergence Switching for Superresolution-Based Nonnegative Matrix Fa...
Online Divergence Switching for  Superresolution-Based  Nonnegative Matrix Fa...Online Divergence Switching for  Superresolution-Based  Nonnegative Matrix Fa...
Online Divergence Switching for Superresolution-Based Nonnegative Matrix Fa...
奈良先端大 情報科学研究科
 
診療予約システムのご紹介
診療予約システムのご紹介診療予約システムのご紹介
診療予約システムのご紹介
rise5720
 
Depth Estimation of Sound Images Using Directional Clustering and Activation...
Depth Estimation of Sound Images Using  Directional Clustering and Activation...Depth Estimation of Sound Images Using  Directional Clustering and Activation...
Depth Estimation of Sound Images Using Directional Clustering and Activation...
奈良先端大 情報科学研究科
 

Viewers also liked (16)

サマーセミナー2016: GitHubマイニング
サマーセミナー2016: GitHubマイニングサマーセミナー2016: GitHubマイニング
サマーセミナー2016: GitHubマイニング
 
サマーセミナー2016: GPSを使って手術を支援しよう ー 手術ナビゲーションシステム入門
サマーセミナー2016: GPSを使って手術を支援しよう ー 手術ナビゲーションシステム入門サマーセミナー2016: GPSを使って手術を支援しよう ー 手術ナビゲーションシステム入門
サマーセミナー2016: GPSを使って手術を支援しよう ー 手術ナビゲーションシステム入門
 
Online Divergence Switching for Superresolution-Based Nonnegative Matrix Fa...
Online Divergence Switching for  Superresolution-Based  Nonnegative Matrix Fa...Online Divergence Switching for  Superresolution-Based  Nonnegative Matrix Fa...
Online Divergence Switching for Superresolution-Based Nonnegative Matrix Fa...
 
保険関連文書の自動校正支援
保険関連文書の自動校正支援保険関連文書の自動校正支援
保険関連文書の自動校正支援
 
(Slides) A Method for Distributed Computaion of Semi-Optimal Multicast Tree i...
(Slides) A Method for Distributed Computaion of Semi-Optimal Multicast Tree i...(Slides) A Method for Distributed Computaion of Semi-Optimal Multicast Tree i...
(Slides) A Method for Distributed Computaion of Semi-Optimal Multicast Tree i...
 
診療予約システムのご紹介
診療予約システムのご紹介診療予約システムのご紹介
診療予約システムのご紹介
 
サマーセミナー2016: ヒトのからだのばらつきを調べる医用画像処理技術 ― 計算解剖学入門
サマーセミナー2016: ヒトのからだのばらつきを調べる医用画像処理技術 ― 計算解剖学入門サマーセミナー2016: ヒトのからだのばらつきを調べる医用画像処理技術 ― 計算解剖学入門
サマーセミナー2016: ヒトのからだのばらつきを調べる医用画像処理技術 ― 計算解剖学入門
 
サマーセミナー2016:耐故障分散アルゴリズムのシミュレーション
サマーセミナー2016:耐故障分散アルゴリズムのシミュレーションサマーセミナー2016:耐故障分散アルゴリズムのシミュレーション
サマーセミナー2016:耐故障分散アルゴリズムのシミュレーション
 
Garapon introduction
Garapon introductionGarapon introduction
Garapon introduction
 
サマーセミナー2016: スマートホームにおける家電操作履歴を用いた居住者向けサービス提供システムの開発
サマーセミナー2016: スマートホームにおける家電操作履歴を用いた居住者向けサービス提供システムの開発サマーセミナー2016: スマートホームにおける家電操作履歴を用いた居住者向けサービス提供システムの開発
サマーセミナー2016: スマートホームにおける家電操作履歴を用いた居住者向けサービス提供システムの開発
 
サマーセミナー2016: スマートフォンを用いた自動避難誘導アプリを体験してみよう
サマーセミナー2016: スマートフォンを用いた自動避難誘導アプリを体験してみようサマーセミナー2016: スマートフォンを用いた自動避難誘導アプリを体験してみよう
サマーセミナー2016: スマートフォンを用いた自動避難誘導アプリを体験してみよう
 
(Slides) A demand-oriented information retrieval method on MANET
(Slides) A demand-oriented information retrieval method on MANET(Slides) A demand-oriented information retrieval method on MANET
(Slides) A demand-oriented information retrieval method on MANET
 
Depth Estimation of Sound Images Using Directional Clustering and Activation...
Depth Estimation of Sound Images Using  Directional Clustering and Activation...Depth Estimation of Sound Images Using  Directional Clustering and Activation...
Depth Estimation of Sound Images Using Directional Clustering and Activation...
 
トップエスイー勉強会2014第1回-INTER-Mediator
トップエスイー勉強会2014第1回-INTER-Mediatorトップエスイー勉強会2014第1回-INTER-Mediator
トップエスイー勉強会2014第1回-INTER-Mediator
 
ハイブリッドクラウド運用の自動化
ハイブリッドクラウド運用の自動化ハイブリッドクラウド運用の自動化
ハイブリッドクラウド運用の自動化
 
Cortana for Windows Phone
Cortana for Windows PhoneCortana for Windows Phone
Cortana for Windows Phone
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
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
Enterprise Knowledge
 
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
giselly40
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
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...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 

MVVM from Scratch using Silverlight PUG Monthly Meet - July 2011

  • 1. MVVM from Scratch using Silverlight - By Kunal Chowdhury
  • 2. Agenda What is MVVM? Why to use MVVM? Events Replacement Demo MVVM Guidelines
  • 3. What is MVVM? MVVM stands for: (M)odel (V)iew (V)iew (M)odel View ViewModel Model
  • 4. What is MVVM? (contd.) View ViewModel Model
  • 5. Why to use MVVM? Loose coupling between the Model, View and ViewModel Create almost 0 code behind lines Reusability of the ViewModel code Unit testing of the ViewModel independently Designers can work in the View without messing up the logic Would benefit from a root ViewModel class for the state management
  • 6. Event Replacement Notification Command Event Aggregation Behavior
  • 8. MVVM Guidelines Separate your View and ViewModel Don’t write any code in .xaml.cs unless require Try to use the Behavior whenever require. This will make sure that, your code behind is clean Your ViewModel should not know it’s View ViewModel should not have any instance of UIElements Expose properties and Bind them in the View
  • 9. Resources Silverlight Articles –http://tinyurl.com/silverlightarticles MVVM Articles - http://tinyurl.com/mvvmarticles Silverlight Zone – http://www.silverlight-zone.com Silverlight.Net – http://www.silverlight.net

Editor's Notes

  1. Improved power awareness prevents the screen saver from being shown while watching video and allows the computer to sleep when video is not active.Remote control support, allowing users to control media playbackDRM advancements that allow seamless switching between DRM media sources.Enhanced OpenType support.Support for Postscript vector printing enables users to create reports and documents, including the ability to create a virtual print view different from what is shown on the screen.The DataContextChanged event is being introduced. WS-Trust support: Security Assertion Markup Language authentication token.Call existing unmanaged code directly from within Silverlight with P/Invoke.