0
MVC, MVP,  and MVVM  A comparison of model-  view separation  architectural patterns1
2	A pattern is a solution to a well-understood problem
3	An architectural patternsolves architectureproblems
4	The SmartUI pattern is where youhave logic in the code-behindPros                 Cons›  Fast               ›  Rigid›...
5	MVC, MVP, and MVVM are allsolving this problem›  Get  the logic out of the UI›  Loosely coupled›  Reusable›  Unit-te...
6	Note that they all have a modeland a view
7	The Model is pure business logic›  Completely   unaware of the other components›  Very unit-testable
8	The view deals with UI only›  Itdisplays data from the model›  Should be kept as thin as possible
Browser	                        	              Controller                              How MVC works                      ...
Browser	                  Presenter	                                   How MVP works                                      ...
Browser	                           l	                  ViewMode                                                     17	   ...
20	MVC vs. MVPMVC                             MVP›  User  hits the C first       ›  Userhits the V first›  V can switch...
21	MVC vs. MVVMMVC                         MVVM›  C is much more           ›  VM   is much simpler – It    powerful than...
22	MVVM vs. MVPMVVM                           MVP›  M   is a business object    ›  M    is a UI thing, not a            ...
23	So which should I choose?›  MVC  is best for web applications›  MVP is best for windows forms›  MVVM is best for WPF...
24	Conclusion›  All three architectural patterns solve the problems of    rigidity and fragility›  They are significantl...
25	Further study›  http://joel.inpointform.net/software-development/    mvvm-vs-mvp-vs-mvc-the-differences-explained/›  ...
Upcoming SlideShare
Loading in...5
×

Mvc, mvp, mvvm.pptx

4,056

Published on

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

No Downloads
Views
Total Views
4,056
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
171
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Mvc, mvp, mvvm.pptx"

  1. 1. MVC, MVP, and MVVM A comparison of model- view separation architectural patterns1
  2. 2. 2 A pattern is a solution to a well-understood problem
  3. 3. 3 An architectural patternsolves architectureproblems
  4. 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. 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. 6 Note that they all have a modeland a view
  7. 7. 7 The Model is pure business logic›  Completely unaware of the other components›  Very unit-testable
  8. 8. 8 The view deals with UI only›  Itdisplays data from the model›  Should be kept as thin as possible
  9. 9. Browser Controller How MVC works 10 Model View
  10. 10. Browser Presenter How MVP works 13 Model View
  11. 11. Browser l ViewMode 17 How MVVM works Model View
  12. 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. 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. 14. 22 MVVM vs. MVPMVVM MVP›  M is a business object ›  M is a UI thing, not a business thing
  15. 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. 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. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×