MVVM from Scratch using Silverlight PUG Monthly Meet - July 2011

2,813 views

Published on

On last Saturday (i.e. 9th July 2011) I delivered one hour session on "MVVM from Scratch using Silverlight" in Pune User Group's (PUG) Monthly meet. The session was full of demo and very little with slides.

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,813
On SlideShare
0
From Embeds
0
Number of Embeds
748
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 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.
  • MVVM from Scratch using Silverlight PUG Monthly Meet - July 2011

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

    ×