MVVM

1,382 views

Published on

Presentation about the MVVM pattern and some experiences of different MVVM frameworks for Windows Phone 7.

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

No Downloads
Views
Total views
1,382
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

MVVM

  1. 1. MVVMJohan Lindfors
  2. 2. model-view-viewmodel view viewmodel model
  3. 3. separation of concerns• modularity• loose coupling• role separation• tool friendly• maintainability• less code• testability
  4. 4. separation of concerns• role separation• tool friendly• less code
  5. 5. ”everybody wants choices, no one wants to choose”
  6. 6. • role separation + ++ + -• tool friendly ++ + + -• less code + + ++ -
  7. 7. • role separation + ++ + -• tool friendly ++ + + -• less code + + ++ -• coolness - + + ++
  8. 8. • modularity - + + ++• loose coupling - + + ++• role separation + ++ + -• tool friendly ++ + + -• maintainability ++ + - +• less code + + ++ -• testability - + + ++• coolness - + + ++
  9. 9. demo
  10. 10. model• platform independence?• PortableClassLibrary?• [DataContract]
  11. 11. view• xaml• popups• animations• dispatcher
  12. 12. view-model• encapsulation or incorporation of model?• instantiation? 1. per view/page in code 2. per view/page in xaml 3. per application instance 4. using view-model-locator• converters or conversions?
  13. 13. design time using System.ComponentModel; ... if (DesignerProperties.IsInDesignTool) { }• mock service or view model?• what about demo time?
  14. 14. lesson learned design code
  15. 15. johan.lindfors@coderox.se
  16. 16. resources• www.mvvmexplained.com• caliburnmicro.codeplex.com• mvvmlight.codeplex.com• compositewpf.codeplex.com• programmeramera.se• www.coderox.se

×