In MVP (Model-View-Presenter), how does the Presenter's relationship with the View differ from the Controller's relationship with the View in classic MVC, and what problem does that difference solve?
answer
- View = dumb interface, no Model access
- Presenter pushes explicit calls, no binding
- born for unit-testability
- Android pre-Jetpack used MVP
- fat Presenter is the failure mode
basics
~20 sIn MVP, the View is a dumb interface and the Presenter tells it exactly what to display, instead of the View pulling data from the Model itself like in MVC. This makes the app's logic testable without a real screen.
solid answer
~40 sIn MVC the View can read the Model directly and the Controller mainly handles input; in MVP that direct View-to-Model link is cut. The View exposes a narrow interface (e.g., setTitle(), showError()) and knows nothing about the Model. The Presenter sits in between: it receives input from the View, calls the Model, and then explicitly pushes formatted results back to the View through interface method calls - there's no implicit binding. Because the View is reduced to an interface with no logic, you can substitute a mock View in a unit test and verify the Presenter's behavior without ever instantiating a real UI. This was the main motivation for MVP's adoption in frameworks like early Android and WinForms, where the real View is expensive or impossible to instantiate in a test runner.
go deeper
Knows that in MVP the Presenter, not the View, decides what to show and that the View is treated as 'dumb'.
Can articulate why MVP's View-as-interface design makes Presenter logic unit-testable without a real UI runtime, and gives a concrete platform example such as early Android.
Distinguishes Passive View vs Supervising Controller variants, recognizes the fat-Presenter failure mode, and can decide when the extra interface boilerplate is worth it for a given screen.
Weighs MVP's manual-wiring cost against MVVM/data-binding at the platform/team level, and can explain the historical industry shift from Android MVP to Architecture Components as a response to that cost, not just a fashion change.
## Where the wiring lives MVP (Model-View-Presenter) emerged as a refinement of MVC aimed squarely at **testability**, and the clearest way to see the difference is to trace where the 'View reads Model state' wiring lives. In classic MVC, the View is typically permitted to observe the Model directly — it registers for change notifications, pulls the current state, and redraws itself; the Controller's job is mostly to translate input events into Model mutations. That means a meaningful chunk of 'what shows on screen given this state' logic can live inside the View itself, tangled up with actual rendering code. ## What MVP changes MVP severs that link entirely. - **The View** in MVP is treated as a passive, nearly logic-free implementation of a narrow interface — commonly literally an interface/protocol type, e.g. an interface with methods like `showError(msg)` and `setLoadingVisible(visible)`. It forwards raw input events (button clicks, text changes) to the Presenter, and does nothing else with them — no interpretation, no validation, no reading the Model. - **The Presenter** is the one object that knows about both the View interface and the Model: it receives the forwarded event, invokes Model operations, and then explicitly calls methods on the View interface to push the exact, already-formatted result. There is no implicit observation or binding — every View update is an explicit, traceable method call initiated by the Presenter. ## Why the pattern exists The reason this exists is unit-testability of interaction logic, not just business logic. MVC already lets you test the Model without a UI, but the coordination logic — which error message to show for which failure, what order calls happen in, when to show a spinner — typically lived in the View or Controller and required a real UI to exercise. By reducing the View to a pure interface, MVP lets a test double implement that interface trivially, and the test asserts on which interface methods the Presenter called and with what arguments, with zero real UI framework in the test process. This mattered enormously on platforms where instantiating the real View was slow or impossible outside a running app. The classic examples: - **early Android**, where Activities/Fragments are heavyweight and hard to unit test without an emulator (which is exactly why early Android architecture guidance pushed MVP); - **WinForms/Swing desktop apps**, where MVP (an idea articulated at Taligent and popularized further by Martin Fowler's 'Passive View' and 'Supervising Controller' variants) let teams test dialog and form logic headlessly. ## The cost The trade-off is verbosity and manual wiring. Every piece of state the View needs to display requires an explicit interface method and an explicit Presenter call — there's no framework mechanism that keeps View and Model in sync automatically. For a screen with twenty fields, that's twenty methods on the View interface and twenty corresponding calls scattered through the Presenter, which is a lot of boilerplate compared to a data-binding approach. It also means the Presenter must remember to call every relevant View method any time related state changes, which is a manual synchronization burden a human can get wrong. ## Failure modes The dominant failure mode is analogous to MVC's fat Controller: - a **'fat Presenter'** that accumulates so many View-interface methods and so much sequencing logic that it becomes its own untestable monolith, especially once conditional branches multiply. Because the Presenter is the sole owner of all View-update sequencing, it tends to grow unboundedly on screens with many states. - a second common failure, **Presenters that quietly start referencing platform/UI types anyway**, which reintroduces the untestability MVP was adopted to remove. ## A concrete example A concrete real-world example: Google's official Android Architecture Guide, roughly 2016-2018, recommended MVP as the pattern for testable Android apps precisely because Activity/Fragment classes couldn't be constructed in a plain JVM unit test — a mock View interface let Presenter logic be tested with fast, JVM-only unit tests instead of slow instrumented device tests. Android's later move toward MVVM via Architecture Components' LiveData/ViewModel was driven by wanting to eliminate exactly the boilerplate described above by letting the View auto-observe state instead of the Presenter manually pushing it.
- Why can't you unit-test View-update sequencing in classic MVC as easily as in MVP?Because in MVC the View is allowed to read the Model and decide what to render itself, so that decision logic is embedded inside real UI rendering code that typically requires an actual UI framework instance to execute. MVP moves that decision logic into the Presenter and reduces the View to a mockable interface, so the same logic can be exercised with a lightweight test double instead.
- What is the 'Supervising Controller' variant of MVP and how does it differ from 'Passive View' MVP?In Passive View MVP, the View has zero logic and every single update is an explicit Presenter call. Supervising Controller relaxes this by allowing simple, declarative data-binding for trivial display-only bindings, such as binding a text field directly to a Model property, while the Presenter still handles complex logic like error states and visibility toggling.
- What's a warning sign that a team's Presenter layer has become a 'fat Presenter'?The Presenter class has dozens of View-interface methods it calls in deeply nested conditional branches, and testing it requires setting up many mock interactions to cover all the sequencing paths. That's a sign the coordination logic itself needs to be decomposed, often by extracting state-computation into its own testable unit that the Presenter just applies.
Like a stage director (Presenter) who tells an actor (View) exactly which line to say and when, versus the actor reading the script (Model) themselves - the director's careful command means you can rehearse the direction alone, with a stand-in actor, without ever staging the real performance.
saying these in an interview costs you the question
- says MVP's View can read the Model directly like in MVC
- thinks Presenter and Controller are interchangeable with no distinguishing trait
- can't explain why MVP is more unit-testable than MVC for UI logic
- lets Presenter hold a reference to a concrete UI widget instead of the View interface
- assumes MVP requires a data-binding framework