Home / ASP.NET Wiki / Architecture / Design Patterns / MVP Pattern

MVP Pattern

 Rate It (13)

MVP (Model View Presenter) Framework

The MVP pattern is an Architecture Pattern used to build ASP.net applications.  It refers to splitting up the responsibilities for gathering, displaying, and storing data from a web page into separate objects: a Model object, a View object, and a Presenter object.  The View is often an interface which is then implemented by an ASP.net web page; the Model is a business object.  The Presenter negotiates the transfer of data between the other two objects.  The MVP pattern descends from the Model View Controller pattern that was originally described in Smalltalk.

The advantage of having the View be an interface is that it can be implemented by many different presentation models other than a web page, such as a Fitnesse page, an NUnit mock class, or a Windows application.

Tutorials

 Articles

 Videos

Revision number 5, Tuesday, February 17, 2009 9:32:24 AM by scott@elbandit.co.uk

Comments

Something came across my mind. A presenter joins the View and Model. - What is the benefit of having a presenter? - Why can't the view talk to the model immediately?

What is the main difference between MVP and MVC.

is MVP a design pattern

Reply to Live Wire: MVC - Model View Controller is both a design pattern and an architecture.

Reply to sirdneo: MVC - (flow is linear) View(UI)-->Controller(BLL,DAL)-->Model(DB)-->View(UI) MVP - (flow is bi-directional) View(UI)-->Presenter(BLL, DAL)-->Model(DB) An application following MVP is may also be called 3-tier application. 3-tier architecture - 1. Presentation Layer (UI) 2. Logic Layer a. Business Logic Layer b. Data Access Layer 3. Data Layer (DB)

MVP - (flow is bi-directional) View(UI)-->>Presenter(BLL, DAL)-->>Model(DB)

Ha ha, some serious issue with this list-box; its not accepting ''. The opposit of '>'. Let me try again........... MVP - (flow is bi-directional) View(UI)''-->>Presenter(BLL, DAL)''-->>Model(DB)

Not working :(

Nice introduction

Which is best in terms of Performance and Scalability MVC or MVP?

The main point of any of the MV patterns is create single use units which are easier to test and reuse. I don't regard MVP and MVC are mutual exclusive. So they'd be no reason why a Presenter couldn't be referenced inside a Controller. In fact I'd consider that quite wise to have the presenter present and the controller control which and when presenters are implemented.

Shortcuts

Table of Contents

Top Wiki Contributors

(last 30 days)

  1. abiruban (1)