Your SlideShare is downloading. ×
0
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
Mvc, mvp, mvvm.pptx
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

Mvc, mvp, mvvm.pptx

3,752

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,752
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
162
Comments
0
Likes
1
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. MVC, MVP, and MVVM A comparison of model- view separation architectural patterns1
  • 2. 2 A pattern is a solution to a well-understood problem
  • 3. 3 An architectural patternsolves architectureproblems
  • 4. 4 The SmartUI pattern is where youhave logic in the code-behindPros Cons›  Fast ›  Rigid›  Easy to code ›  Resistant to change ›  Unforgiving
  • 5. 5 MVC, MVP, and MVVM are allsolving this problem›  Get the logic out of the UI›  Loosely coupled›  Reusable›  Unit-testable›  UI designers can work on the UI
  • 6. 6 Note that they all have a modeland a view
  • 7. 7 The Model is pure business logic›  Completely unaware of the other components›  Very unit-testable
  • 8. 8 The view deals with UI only›  Itdisplays data from the model›  Should be kept as thin as possible
  • 9. Browser Controller How MVC works 10 Model View
  • 10. Browser Presenter How MVP works 13 Model View
  • 11. Browser l ViewMode 17 How MVVM works Model View
  • 12. 20 MVC vs. MVPMVC MVP›  User hits the C first ›  Userhits the V first›  V can switch Cs ›  One V to One P›  C talks to V, but V cant ›  Two-way talk to C communication›  C has a reference to the between V and P V ›  V has a reference to the›  V has a reference to the P M ›  V cant see M
  • 13. 21 MVC vs. MVVMMVC MVVM›  C is much more ›  VM is much simpler – It powerful than a VM just ties the V to the M›  User hits the C first ›  User hits the V first›  The view knows about ›  V cant see the M the model ›  V has an instance of the›  V gets an instance of VM the M ›  One VM per V
  • 14. 22 MVVM vs. MVPMVVM MVP›  M is a business object ›  M is a UI thing, not a business thing
  • 15. 23 So which should I choose?›  MVC is best for web applications›  MVP is best for windows forms›  MVVM is best for WPF and Silverlight
  • 16. 24 Conclusion›  All three architectural patterns solve the problems of rigidity and fragility›  They are significantly more work for small projects›  But they pay for themselves with larger projects once you learn the patterns
  • 17. 25 Further study›  http://joel.inpointform.net/software-development/ mvvm-vs-mvp-vs-mvc-the-differences-explained/›  http://russelleast.wordpress.com/2008/08/09/ overview-of-the-modelview-viewmodel-mvvm- pattern-and-data-binding/›  http://rachelappel.com/comparing-the-mvc-and- mvvm-patterns-along-with-their-respective- viewmodels›  http://geekswithblogs.net/dlussier/archive/ 2009/11/21/136454.aspx

×