Click here to Skip to main content
13,708,247 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


27 bookmarked
Posted 27 Nov 2008
Licenced CPOL

MVC v/s MVP - How Common and How Different

, 24 Jan 2013
Rate this:
Please Sign up or sign in to vote.
A comparative introduction to MCV and MVP


Over the years, design patterns are being best practiced in IT and SE. Design Patterns are the solution guidelines to common problems identified in software applications. DPs are taken care of during application design or during refactor process. Most of the times, DPs are not followed because of lack of experience or knowledge. In case of MCV/MVP, lack of knowledge of difference between them is one of the fear factors for not choosing the right pattern. This article would try to differentiate between the usage of MVC and MVP.

Before going into how MVC/MVP work and what are the key benefits of either of the two, a note that can be made is that both of them are being practiced for many years to achieve the OO principle of separation of concern for UI Layer and Business Layers. Both of them are UI presentation patterns.

A number of frameworks are provided to implement these patterns. For example:

  1. JAVA Struts
  2. ROR (Ruby on Rails)
  3. Microsoft Smart Client Software Factory (CAB)
  4. Microsoft Web Client Software Factory
  5. ASP.NET MVC Framework

DPs are the blueprints but not the solution itself. They should be used as a guideline for the implementation within the problem domain/space.

MVC - Class Diagram


MVP - Class Diagram




UI Presentation Pattern focus on separation of view with Model

Based on MVC (UI Presentation Pattern)


Separation of responsibility between three components:

  1. View - responsible for rendering UI elements
  2. Controller - responsible for responding to view actions
  3. Model - responsible for business behavior and state management

Separation of responsibility between four components:

  1. View - responsible for rendering UI elements
  2. View Interface - responsible for loose coupling between view and model
  3. Presenter - responsible for view and model interaction
  4. Model - responsible for business behavior and state management

The three components would interact with each other. Controller would sometime also be responsible to update view (like Front Controller Pattern)

Presenter can also interact with Controller to access Model

4Fairly loose couplingComparatively high degree of loose coupling
5Limited unit testingComparatively high degree of ease of unit testing
6Controller is behavior based and multiple views can share single controllerUsually one view has one presenter (1-1 mapping). Multiple presenters would be associated with a complex view
7Identifies which view to updatePresenter will update its associated view


Any pattern has its pros and cons in association with the environment it is being implemented in. It is not always advisable to implement the patterns everywhere in the application. There are benefits of MVC/MVP usage:

  1. Code reuse - Separation of concern principle will provide code reusability as the design will have a proper domain model and business logic in its logical unit.
  2. Adaptable design - A good design is closed for changes and open for additions. Isolated code in presenter/controller, domain model, view, and data access provide the freedom of choosing a number of views and data sources.
  3. Layering - MVC/MVP forces to separate data access login for the other layers and various other patterns would be opted to implement the data access layer.
  4. Test driven approach - Isolated implementation allows to test each component separately. Especially in MVP pattern that uses interface for a view, it is a true test driven approach.


  1. Higher complexity
  2. Extra learning curve
  3. Experience and knowledge makes a difference in the right implementation
  4. Not suitable for simple and small solutions


I thank to Todd Snyder who had written a very good article and explained it well for everyone. All the credit of this article also goes to him only.


  • 27th November, 2008: Initial post 


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
India India

Comments and Discussions

QuestionStrongly Disagree with few things Pin
Ranjan.D12-Jan-13 10:09
memberRanjan.D12-Jan-13 10:09 
Question... Pin
Jayson Ragasa30-Nov-11 14:49
memberJayson Ragasa30-Nov-11 14:49 
GeneralMy vote of 5 Pin
radumi5-Aug-10 17:48
memberradumi5-Aug-10 17:48 
GeneralMy vote of 2 Pin
Greg Olmstead12-Dec-08 7:23
memberGreg Olmstead12-Dec-08 7:23 
QuestionController in MVP? Pin
zeneclectic1-Dec-08 6:16
memberzeneclectic1-Dec-08 6:16 
AnswerRe: Controller in MVP? [modified] Pin
Neeraj.Soni1-Dec-08 21:04
memberNeeraj.Soni1-Dec-08 21:04 
GeneralMy vote of 2 Pin
tf12428-Nov-08 15:01
membertf12428-Nov-08 15:01 
GeneralMy vote of 1 Pin
Puchko Vasili27-Nov-08 4:48
memberPuchko Vasili27-Nov-08 4:48 
GeneralMy vote of 1 Pin
Sadadevguru27-Nov-08 2:25
memberSadadevguru27-Nov-08 2:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web06-2016 | 2.8.180920.1 | Last Updated 24 Jan 2013
Article Copyright 2008 by Neeraj.Soni
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid