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

サマーセミナー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...Naoki Shibata
 
診療予約システムのご紹介
診療予約システムのご紹介診療予約システムのご紹介
診療予約システムのご紹介rise5720
 
サマーセミナー2016: ヒトのからだのばらつきを調べる医用画像処理技術 ― 計算解剖学入門
サマーセミナー2016: ヒトのからだのばらつきを調べる医用画像処理技術 ― 計算解剖学入門サマーセミナー2016: ヒトのからだのばらつきを調べる医用画像処理技術 ― 計算解剖学入門
サマーセミナー2016: ヒトのからだのばらつきを調べる医用画像処理技術 ― 計算解剖学入門奈良先端大 情報科学研究科
 
サマーセミナー2016:耐故障分散アルゴリズムのシミュレーション
サマーセミナー2016:耐故障分散アルゴリズムのシミュレーションサマーセミナー2016:耐故障分散アルゴリズムのシミュレーション
サマーセミナー2016:耐故障分散アルゴリズムのシミュレーション奈良先端大 情報科学研究科
 
Garapon introduction
Garapon introductionGarapon introduction
Garapon introductionGarapon inc.
 
サマーセミナー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 MANETNaoki Shibata
 
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-MediatorMasayuki Nii
 
ハイブリッドクラウド運用の自動化
ハイブリッドクラウド運用の自動化ハイブリッドクラウド運用の自動化
ハイブリッドクラウド運用の自動化UNIRITA Incorporated
 
Cortana for Windows Phone
Cortana for Windows PhoneCortana for Windows Phone
Cortana for Windows PhoneKunal Chowdhury
 

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

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
 
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 WorkerThousandEyes
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech 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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

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...
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech 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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

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.