Introduction
This article will compare four important architecture presentation patterns i.e. MVP(SC),MVP(PV),PM,MVVM and MVC. Many developers are confused around what is the difference between these patterns and when should we use what. This article will first kick start with a background and explain different types of presentation patterns. We will then move ahead discussing about the state , logic and synchronization issues. Finally we will go in detail of each pattern and conclude how they differ from each other.
Here’s my small gift for all my .NET friends , a complete 400 pages FAQ Ebook which covers various .NET technologies like Azure , WCF , WWF , Silverlight , WPF , SharePoint and lot more from
Background - Presentation patterns
One of the biggest problems associated with user interface is lot of cluttered code. This cluttered code is due to two primary reasons , first the UI has complicated logic to manipulate the user interface objects and second it also maintains state of the application. Presentation patterns revolve around how to remove the UI complication and make the UI more clean and manageable. Below are different variety and classifications of presentation patterns as shown in the below figure.
Presentation pattern are divided in to three important categories MVP ( Model view presenter ) , MVC ( Model view controller) and finally (PM) presenter model. MVP is further divided in to supervising controller and passive view. Presenter model is further divided by Microsoft team in two technology specific patterns MVVM for silverlight and MVVM for WPF.
3 big problems of UI :- State , Logic and Synchronization
There are 3 big problems associated with UI as listed below.
State
Logic
Synchronization
The Hero - Presentation design Pattern
Presentation design pattern helps to solve the above UI problems. The base logic of presentation design patterns is that we need to create a extra class which will consume complicated logic , data and synch issues which currently the UI does , thus making the UI dump , clean and simple. Depending on how much this class takes responsibilities defines further whether its a SC , PV , PM design pattern etc. In other words its the maturity of the presenter class which will define what kind of design pattern it is.
Some acronyms to simplify the article
Acronym | Full form |
V | View or user Interface. |
P | Presenter class which has the UI logic. |
L | UI logic |
S | State of the UI |
M | Business components or domain objects. |
SC | Supervising controller . |
PV | Passive view. |
PM | Presenter model. |
We will use the above acronym to simplify our explanation of presentation design pattern.
Supervising controller pattern ( SC )
Fundamentals about SC :-
- State is stored in the view.
- Presenter owns the complex presentation logic. Simple UI binding logic is taken care by using binding technologies like WPF binding and Silverlight binding. Anything complex is taken care presenter class.
- Presenter is aware of the view.
- View is not aware of the presenter.
- View connects with model using technical bindings provided by WPF and Silverlight.
Passive view (PV)
Fundamentals about PV :-
- State is stored in the view.
- All logic of UI is stored in presenter.
- View is completely isolated from the model. It also takes the extra task of synchronizing data between model and view.
- Presenter is aware of the view.
- View is not aware of the presenter.
You can read more about MVP (PV) from this , it also has a sample code which shows how MVP comes in to action
Presentation Model (PM)
Fundamentals about SC :-
- State is stored in the presenter.
- Logic is stored in presenter.
- Presenter represents a abstract view of the UI.
- Presenter is not aware of the view.
- View is aware of the presenter.
- View is completely isolated from the model.

MVVM
Fundamentals about SC :-
- Presenter model is the base.
- State is stored in the presenter.
- Logic is stored in presenter.
- Presenter represents an abstract view of the UI.
- Presenter is not aware of the view.
- View is aware of the presenter.
- View is completely isolated from the model.
- Uses WPF and Silverlight bindings.
MVC
Fundamentals about MVC :-
- Does not have a presenter , has a controller.
- Request first comes to the controller.
- Controller binds the model with the view.
- Logic is stored in the controller.
You can read more about MVC from this, it also has a sample code which shows how MVC comes in to action
Summarizing
Below is a summary comparison table for all presentation patterns from the aspect of state , logic and synchronization.
| | State | Logic | Synchronization |
Supervising controller | | | | |
| Presenter | | X | X |
| View | X | | |
| Model | View connects to model for data using databindings like WPF bindings , Silverlight bindings etc. | ||
Passive View | | | | |
| Presenter | | X | X |
| View | X | | |
Presenter model | | | | |
| Presenter | X | X | |
| View | | | X |
MVVM | | | | |
| Presenter | X | X | |
| View | | | X |
| Databinding commands of WPF , Silverlight , ASP.NET is used. | |||
MVC | Controller | | X | X |
| View | X | | |
Below is a visual comparison of what we discussed above.
When to use MVP and When to use MVC ?
First thing all the above patterns are variations of MVC. In other words all MVP patterns are twists of MVC. We will compare between MVC and MVP first and then we will compare between different variations of the MVP.
Below are the situations of when MVP is preferred over MVC.
UI unit test :-
Views are same with slight variations
Multi UI support
Complex Screens
Technology used
Technology selection drives 60% of whether you will select MVC or MVP.