DevPrep

All topics › Software architecture

VIPER

Middle PRO

The point

VIPER is MVP evolved in the spirit of Clean Architecture for UIKit: a screen (module) is split into five roles with protocols between them.

There is usually also an Assembly/Builder that creates all parts and wires the references: the View owns the Presenter, the Presenter owns the Interactor and Router; back references (presenter.view, interactor.output, router.viewController) are weak.

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