8 בדצמבר 2007

2 תגובות

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:

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: ,,
הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *

2 תגובות

  1. OhadAston8 בדצמבר 2007 ב 17:24

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

  2. Oleg Zhukov2 בנובמבר 2008 ב 7:58

    Hi Maor,

    Another lightweight yet powerful MVP Framework is MVC# ( ). Please take look at it!


    Oleg Zhukov