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

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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
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.pptxKatpro Technologies
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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 CVKhem
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
🐬 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
 
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
 
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
 
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...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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 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
 

Recently uploaded (20)

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
 
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
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
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...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
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
 
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...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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 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
 

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.