1 / 11

MVVM

MVVM. Damon Payne Microsoft MVP Principal Architect – BigHammer Data. In the Beginning. Smalltalk MVC Split out (data)model, visual representation, and logic/event handling

coen
Download Presentation

MVVM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MVVM Damon Payne Microsoft MVP Principal Architect – BigHammer Data

  2. In the Beginning • Smalltalk MVC • Split out (data)model, visual representation, and logic/event handling • Observer – “ Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically” • Command – “Encapsulate a request as an object”

  3. And Then there were more • Model View Presenter • Supervising Controller • Presentation Model (Screen Model) • http://martinfowler.com/eaaDev/PresentationModel.html

  4. Introducing MVVM • John Gossman, 2005 • http://blogs.msdn.com/b/johngossman/archive/2005/10/08/478683.aspx • Benefits and Goals: • Separate Concerns • Testability • Composition • No code behind! (or as little as possible)

  5. Actors

  6. Demo: MVVM Hello World • Let’s rebuild an all code-behind data-entry page • Data sources • Marshaling between screen and DTOs • Validation • Saving data • Some unit tests?

  7. Round 1 - Curiosities • Where do the ViewModels come from? • Dealing with command explosion • Starting Storyboards?

  8. Help With Async Models • Continue Passing • By default WCF runs on the Browser (UI) thread • Model-hydrating callbacks and async validation

  9. MVVM at Design time (Will it blend?) • Not the same as www.willitblend.com • Design time data • Behaviors

  10. Round 2 - Difficulties • How do we deal with Child Windows ? • Component Communication? • (We’ll defer this one till the end) • Parent-child models? • Recommend reusable editors be scoped to Model objects (Demo) • Complex command interactions

  11. Keep the Conversation Going (I’m lonely) • damon@damonpayne.com • http://www.silverlightarchitect.net • http://Feeds.feedburner.com/damonpayne • Twitter.com/damonpayne • Relevant articles: • View-Based Navigation

More Related