Why Architectural Design like MVC/MVP ?
MVC/MVP aims to decouple components as much as possible:
As proper MVP and MVC implementations have the following characteristics:
- Readable and maintainable code
- Modular code which provides high degree of decoupling
- More testable code
- Code which is fun to work with
We various type of Variation in these patterns
There is no universally unique MVC pattern.
Model View Presenter
It divides the app into three layers Model, View, Presenter.
Model: Handles the data part
Presenter:- acts as a bridge between Model and view
View:- Responsible for laying out views with the relevant data as instructed by the Presenter
Note: The View never communicates with Model directly.
In very detail