DevPrep

All topics › Software architecture

MVP

Middle PRO

The point

MVP is the UIKit answer to the Massive View Controller. Three roles:

Difference from MVC: the controller stops being the "brain" and becomes part of the View. Difference from MVVM: the Presenter imperatively calls View methods (showError) instead of publishing observable state.

The rest of this answer, with code and interview follow-ups, is in the DevPrep app.

Read the full answer in DevPrep

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store