Software architecture
Model-View-Presenter (MVP) is a user-interface architectural pattern that separates application data and rules from presentation logic and the visible interface. The Presenter interprets user actions, obtains or changes state through the Model, and instructs the View, making interface behavior easier to test independently of a graphical toolkit.1
Model-View-Presenter divides a user interface into three collaborating roles: the Model represents domain data and operations, the View displays information and exposes user events, and the Presenter coordinates the interaction between them. The View generally avoids business decisions, while the Presenter supplies display-ready data and reacts to commands such as selections, submissions, or navigation. This separation reduces dependence on widgets, windows, and event frameworks, and it gives presentation behavior a distinct home.1
MVP belongs to the family of interface patterns influenced by Model–view–controller, but it assigns more explicit interaction responsibility to the Presenter. Its value is greatest where interface rules are substantial, state transitions need systematic testing, or the same domain behavior must support more than one presentation technology.
The Presenter is the pattern's defining role because it mediates between a view contract and application services. In Passive View, the View is deliberately thin: it exposes properties and events, and the Presenter performs nearly all presentation logic. This arrangement maximizes isolation and makes unit testing straightforward, although it can produce verbose interfaces and many small data-transfer operations.1
Supervising Controller permits the View to perform simple data binding or display transformations while the Presenter handles coordination and nontrivial decisions. The boundary is therefore not universal: teams may place validation, formatting, and state synchronization differently according to the framework. The Qt model–view framework and desktop toolkits often provide their own binding or delegate mechanisms, so an MVP design may wrap rather than replace those facilities.
An MVP implementation commonly begins with a view interface containing only the operations the Presenter needs, such as showing a loading state, rendering a result, or reporting an error. A concrete screen implements that interface and forwards user events to the Presenter. The Presenter receives repositories, services, and the view through constructors or another form of dependency injection; it then coordinates asynchronous work and updates the view when results arrive.
This structure permits tests to substitute a fake View and controlled Model or service, checking interaction outcomes without launching a window or device. Tests can cover validation, empty results, failures, cancellation, and repeated submissions as ordinary code paths. Modern guidance for application architecture likewise emphasizes separating UI state and business responsibilities from UI components, even when it does not prescribe MVP by name. MVP is an organization technique, not a substitute for domain modeling, concurrency control, or accessibility design.
MVP has no single authoritative implementation, and its terminology has shifted across communities. Martin Fowler distinguished Passive View from Supervising Controller because both arrangements were called MVP while assigning different amounts of work to the View.1 Earlier GUI discussions also treated presentation architecture as a spectrum rather than a fixed three-class template.
A Presenter can be reused across several views only when their contracts and interaction assumptions genuinely match; otherwise, reuse tends to create a large abstraction with awkward conditional behavior. Conversely, one view may coordinate several presenters when a screen contains independent regions, though lifecycle and event ownership then require care. MVP is especially useful in legacy interfaces, where extracting a view contract can isolate code from a proprietary widget library. It is less attractive when a framework's declarative binding, state-management, or unidirectional architecture already provides clearer boundaries, as in many contemporary web and mobile systems.
MVP is a family of related presentation patterns rather than a single formal specification; names and responsibility boundaries vary by framework and design tradition.
Help improve the encyclopedia. Reports go straight to the site manager.