MVC vs MVP

Software Development December 8th, 2007

MVC or MVP? You’ve probably heard about Microsoft’s new ASP.NET MVC Framework.

MVC methodology divides an application’s implementation into three component roles:

  • Models
  • Views
  • Controllers.

MVP approach divides an application’s implementation into:

  • Model
  • View
  • Presenter

What is the difference between the  MVC and MVP patterns?  Todd Snyder has an excellent explanation. This is summary by the key differences between the two patterns:

MVP MVC
View is more loosely coupled to the model. The presenter is responsible for binding the model to the view Controller are based on behaviors and can be shared across views
Easier to unit test because interaction with the view is through an interface Can be responsible for determining which view to display
Usually view to presenter map one to one. Complex views may have multi presenters  

 

Technorati Tags: ,,

Similar Posts:

Tags: , ,



5 Comments to “MVC vs MVP”

  1. maord | June 22nd, 2009 at 23:11

    This comment originally written by:
    MVC or MVP? You've probably heard about Microsoft's new ASP.NET MVC Framework . MVC methodology divides an application's implementation into three component roles: Models Views Controllers. MVP approach divides an application's implementation

  2. maord | June 22nd, 2009 at 23:11

    This comment originally written by:Oleg Zhukov

    Hi Maor,

    Another lightweight yet powerful MVP Framework is MVC# ( http://www.mvcsharp.org ). Please take look at it!

    Thanks,

    Oleg Zhukov

  3. maord | June 22nd, 2009 at 23:11

    This comment originally written by:Teen Model Talent » MVC vs MVP

    Pingback from  Teen Model Talent  » MVC vs MVP

  4. maord | June 22nd, 2009 at 23:11

    This comment originally written by:rascunho » Blog Archive » links for 2007-12-08

    Pingback from  rascunho  » Blog Archive   » links for 2007-12-08

  5. maord | June 22nd, 2009 at 23:11

    This comment originally written by:OhadAston

    There is a great MVP framework called NMvp, it should be integrated with the Microsoft MVC framework (or Castle MonoRail):

    http://www.stormwindproject.org/…/Home.html

Leave a Comment