MVP architecture is a way of organizing application code into three connected parts: a Model that holds data and business rules, a View that displays the interface and captures user input, and a Presenter that coordinates between them. The core idea is that the View stays passive and the Presenter contains the presentation logic, so the two can be developed and tested separately. That short definition is accurate, but it hides the distinctions that actually matter in practice—especially the difference between MVP as a broad architectural pattern and MVP as a specific approach in a particular platform such as Android. This article covers both, explains why the pattern exists, and shows where it helps and where it creates unnecessary work.
The Problem MVP Was Designed to Solve
Before MVP and similar patterns became common, user-interface code often turned into a tangle. A single class would read from a database, validate input, format text, respond to button taps, navigate to other screens, and update widgets. That arrangement works for small demos but becomes costly as an application grows. The logic cannot be tested without launching the interface, the same validation rules get duplicated across screens, and changing the look of a screen risks breaking behavior that has nothing to do with appearance.
MVP separates these concerns. The Model answers questions about data and rules. The View handles what the user sees and does. The Presenter decides what should happen when the user acts, asks the Model for what it needs, and tells the View what to display. Because the Presenter does not depend on concrete UI classes, it can be tested in isolation with a fake View and a fake Model—no emulator, browser, or device required.
This separation is the real payoff. The pattern is not about aesthetics or folder structure. It is about making business and presentation logic testable and keeping the UI replaceable.
The Three Components in Detail
Model
The Model is the layer that knows about data and domain rules. Depending on the application, it might include entities, repositories, network clients, database access objects, and validation or calculation logic. A useful rule of thumb is that the Model should not know the View or the Presenter exists. It exposes operations such as "fetch the user's orders" or "save this draft" and returns results, errors, or observable streams.
In small applications the Model is often thin—perhaps just a couple of data classes and a repository. In larger ones it may be a full domain layer with use cases. MVP does not prescribe how elaborate the Model must be; it only requires that data and rules live outside the View and Presenter.
View
The View is the visible interface: screens, fragments, activities, HTML templates, or console output. In MVP the View is deliberately "dumb." It displays what it is told and forwards user events to the Presenter. It should contain as little decision-making as possible—ideally none.
A common and important detail is how the View references the Presenter. In passive view MVP, the View holds a reference to the Presenter and calls methods on it when the user interacts. In supervising controller MVP, the Presenter handles complex logic while the View may perform simple data binding itself. Most modern descriptions of MVP assume the passive view style because it maximizes testability, but the supervising controller variant is legitimate and appears in older literature, including descriptions associated with Martin Fowler's writing on presentation patterns.
Presenter
The Presenter is the coordinator. It receives events from the View, applies presentation logic, calls the Model, and instructs the View to update. It typically holds a reference to the View through an interface—for example, a LoginView contract with methods such as showProgress(), showError(message), and navigateToHome(). Because that reference is an interface, a test can substitute a stub that records calls instead of rendering pixels.
The Presenter is where the pattern earns its name: it presents Model data in a form the View can render. It decides whether a form is valid, whether to show a loading indicator, what message to display on failure, and where to navigate on success.
How the Pieces Interact
A typical flow looks like this:
1: The user taps "Sign in." The View forwards the entered credentials to the Presenter. 2: The Presenter validates the input. If something is missing, it calls view.showError(...) and stops. 3: If the input is valid, the Presenter calls view.showProgress() and asks the Model to authenticate. 4: The Model returns a success or failure result. 5: The Presenter interprets the result and calls view.hideProgress() followed by either view.navigateToHome() or view.showError(...).
Notice what is absent. The View never talks to the Model directly. The Model never touches the View. The Presenter never manipulates widgets directly—it calls abstract methods. Each arrow in the diagram is one-directional, which is what keeps the layers decoupled.
Why the Pattern Improves Testability
The strongest argument for MVP is unit testing. Consider the sign-in flow above. A test can instantiate the Presenter with a fake View that records method calls and a fake Model that returns a scripted result. The test then asserts that invalid input produces an error message without ever calling the authentication service, and that valid input produces a progress indicator, a hide call, and a navigation call. No device, no network, no timing flakiness.
The same benefit applies to maintenance. If the design team replaces the sign-in screen with a new layout, the Presenter and Model remain unchanged as long as the View contract stays the same. If the authentication rules change, only the Model and possibly the Presenter change. Changes stay local.
MVP Versus MVC and MVVM
MVP is often confused with MVC (Model-View-Controller) and MVVM (Model-View-ViewModel). The distinctions are real, though different communities describe them somewhat differently.
| Pattern | Who handles presentation logic? | How View and logic connect | Typical testing story |
|---|---|---|---|
| MVC | Controller | Controller updates View; in classic smalltalk-style MVC, Views can also observe Models | Controller logic testable, but View and Controller are often tightly coupled in web frameworks |
| MVP | Presenter | View calls Presenter; Presenter calls View through an interface | Presenter testable with a fake View; View is passive |
| MVVM | ViewModel | View binds to observable ViewModel properties; framework synchronizes updates | ViewModel testable; binding reduces manual "tell the view" calls |
The important practical difference between MVP and MVVM is the direction of communication. In MVP, the Presenter explicitly tells the View what to do through method calls. In MVVM, the View observes state exposed by the ViewModel and updates itself through data binding. MVP therefore tends to produce more explicit, imperative code, while MVVM tends to produce more declarative, binding-driven code. Neither is universally better; the choice depends on platform support and team preference.
The difference from MVC is subtler and depends on which MVC tradition you mean. In many server-side web frameworks, the Controller is thin and the framework handles rendering, which is closer to MVP's spirit than to classic desktop MVC. In classic MVC, the View can observe the Model directly, whereas MVP deliberately keeps the View away from the Model. That single rule—View never touches Model—is a reliable way to tell the two apart.
Interpreting "MVP Architecture" in an Android Context
The search phrase "MVP architecture" is especially common among Android developers, because MVP was the dominant recommended pattern in Android development before MVVM and later architectures became widespread. In that context the pattern has specific conventions:
View is usually an Activity or Fragment implementing an interface. It forwards lifecycle events and user actions to the Presenter. Presenter is a plain class that holds a reference to the View interface. It commonly attaches and detaches the View in lifecycle callbacks so that a destroyed Activity does not receive updates. Model is typically a repository or interactor that fetches data from a network or local database.
The lifecycle detail matters. Because Android Activities can be destroyed and recreated (for example, on rotation), a Presenter that holds a direct reference to a destroyed View will cause leaks or crashes. The usual fix is to attach the View in onStart/onCreate and detach it in onStop/onDestroy, and to guard View calls behind a null or weak check. This is a practical concern that the general pattern description does not address but that any Android implementation must.
Common Criticisms and Where MVP Fits Poorly
MVP is not free of drawbacks, and an honest description should name them.
Boilerplate. Every screen needs a View interface, a Presenter, and wiring code. For a simple screen that displays a static list, that overhead can outweigh the benefit. Teams sometimes over-apply the pattern to trivial screens.
Interface proliferation. Each Presenter needs a contract interface for its View, which can multiply quickly. Some teams mitigate this by grouping contracts per feature or by using a single generic View interface with common methods.
Manual View updates. Because the Presenter must explicitly call methods such as showLoading and hideLoading, there is more code than in a binding-based approach. Forgetting a call—such as hiding a progress indicator on an error path—produces a bug that a data-binding pattern would avoid by construction.
Lifecycle complexity on mobile. As noted above, managing attach/detach is extra work that MVVM frameworks often handle more gracefully.
Not a full architecture. MVP describes presentation layering. It says nothing about dependency injection, navigation, persistence, or module boundaries. Real applications need additional decisions in those areas. Calling MVP "the architecture" of an app is a shorthand; it is one layer of the architecture.
Where does MVP fit well? Screens with meaningful presentation logic, forms with validation, flows with multiple states (loading, success, error, empty), and applications where the UI technology may change or where thorough unit testing of presentation logic is a priority. It also fits teams already comfortable with explicit imperative code.
A Compact Example
The following is illustrative pseudocode rather than a specific language or framework:
A test would create a FakeLoginView that records calls and a FakeAuthService that returns a scripted result, then assert on the recorded calls. No UI is involved. That is the pattern's central promise in a few lines.
Practical Advice for Using MVP Well
Define the View contract narrowly. A View interface should expose only what a specific screen needs. Broad interfaces with dozens of methods become hard to fake and hard to reason about. Keep the Presenter free of platform types. If the Presenter imports Android or browser classes, it becomes harder to test and less portable. Pass plain data and callbacks instead. Handle the lifecycle explicitly on mobile. Attach and detach the View, and make View calls safe when the View is absent. Do not force the pattern onto trivial screens. A static "About" page does not need a Presenter. Apply the pattern where presentation logic actually exists. Use dependency injection for the Model. Constructing Presenters with their dependencies makes tests and configuration cleaner. Prefer the passive view style unless you have a reason not to. It maximizes testability and keeps the View simple.
The Bottom Line
MVP architecture organizes an application into a Model for data and rules, a passive View for display and input, and a Presenter that coordinates the two through an interface. Its purpose is separation of concerns, with unit testability of presentation logic as the main benefit. It differs from MVC in keeping the View away from the Model, and from MVVM in using explicit Presenter-to-View calls rather than data binding. It carries real costs—boilerplate and lifecycle management chief among them—so it is best applied to screens with genuine presentation logic rather than to every screen in an application. In an Android context, the pattern carries specific lifecycle conventions that any implementation must respect.