Google News
logo
IOS - Interview Questions
What is Model-View-Presenter Architecture?
Model View Presenter (MVP) is a design pattern that separates the objects into three main components: Model, View, and Presenter. Now, the View Controller is considered as View, and the presenter contains all the business logic of the application.
 
View : The view consists of the View and View Controller. It contains only the view related code. It takes care of all the UI setup and events.

Presenter : The presenter contains all the business logic of the application. It defines the user actions and updates the UI accordingly via the delegate methods. It is not UIKit dependent and, therefore, easily testable.

Model : The model contains the application data. The networking calls, parser, extensions, manager, etc. take place here.
Advertisement