Your SlideShare is downloading. ×
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Introduction to MVVM Framework
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to MVVM Framework

2,709

Published on

It's just an introduction to MVVM framework

It's just an introduction to MVVM framework

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

  • Be the first to like this

No Downloads
Views
Total Views
2,709
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
93
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Introduction to MVVM
    In Silverlight
    Honeyson Joseph D
    http:/facebook.com/honeydev
    1
    http:/facebook/honeydev
  • 2. What is MVVM ??
    • MVVM is nothing but a Pattern.
    • 3. Also known as Presentational Model.
    • 4. Model-View-ViewModelpattern is similar to MVC
    2
    http:/facebook/honeydev
  • 5. Let’s see some variations of similar patterns
    MVC Pattern
    • Model View Controller is probably the oldest pattern.
    • 6. Still using widely, especially with ASP.NET MVC.
    3
    http:/facebook/honeydev
  • 7. Passive View Pattern
    • View is completely Passive.
    • 8. The controller has lot of responsibilities.
    • 9. Testing a View is very difficult and time consuming.
    4
    http:/facebook/honeydev
  • 10. Presentation Model Pattern(MVVM)
    • Controlleris replaced with ViewModel.
    • 11. Viewis more active and pushing information to the Model.
    • 12. The interactions is done via Data Binding.
    5
    http:/facebook/honeydev
  • 13. 6
    http:/facebook/honeydev
  • 14. Model
    Model represents the business domain which includes the
    model classes used (Customer, Order, etc.), data access
    code and business rules.
    7
    http:/facebook/honeydev
  • 15. View
    Viewin MVVM represents the screens that we build.
    Includes :
    1.XAML files
    2.code-beside files
    Responsibilities :
    1.displaying data
    2.collecting data from end users
    View isn't responsible for retrieving data, performing any
    business rules or validating data
    8
    http:/facebook/honeydev
  • 16. ViewModel
    ViewModel acts as middle-man between View and Model
    Responsibilities :
    Aggregating and storing data that will be bound to a View
    9
    http:/facebook/honeydev
  • 17. Helpers around MVVM…
    10
    http:/facebook/honeydev
  • 19. Helpers around MVVM…cont
    View might need to notify the ViewModelabout something happened in the View.
    eg: a control being clicked.
    ViewModelneed to notify to the View when something happen.
    For these we use Events, another good way is to use Messages.
    11
    http:/facebook/honeydev
  • 20. MVVM in Silverlight
    • We use MVVM Light Tools V.x
    • 21. This is an open source MVVM very light Framework with 2
    DLLs
    Components
    Also
    1. EventToCommandwhich can be used to get rid of annoying
    WPF and SL Command binding limitations.
    2. DispatcherHelperfor multi-threaded applications.
    12
    http:/facebook/honeydev
  • 24. For Example
    Step 1
    VIEW
    Button Base.Command connects view with ViewModel (GetPersonreturntype is Icommand—comand object)- following Commn design pattern
    VIEW Model
    PersonViewModelcontructor connects to PersonModel
    13
    http:/facebook/honeydev
  • 25. Model
    Property changed event results in UI updates – from context (two way binding)
    14
    http:/facebook/honeydev
  • 26. References:
    http://weblogs.asp.net/dwahlin/archive/2009/12/08/getting-started-with-the-mvvm-pattern-in-silverlight-applications.aspx
    http://www.silverlight.net/learn/tutorials/silverlight-4/using-the-mvvm-pattern-in-silverlight-applications/
    http://www.astaticstate.com/2010/04/silverlight-4-using-mvvm-patter-ria.html
    Go on more, share your knowledge that help to others including me……………THANK YOU !
    15
    http:/facebook/honeydev

×