1.

What makes MVC (Model View Controller) different from MVP (Model View Presenter)?

Answer»

Developers prefer to develop Android applications by utilizing a software architecture PATTERN. Architecture patterns allow you to express and define a structural schema for software systems. Developers can easily maintain the software and continue to add features to the software in the future. The two most popular android architecture patterns are MVC (Model View Controller) and MVP (Model View Presenter).

MVCMVP
MVC suggests splitting the code into three components. As soon as the developer creates a class or file for an application, he or she must categorize it into one of three layers: Model, View, and Controller.This is an architectural pattern that helps compensate for some of the shortcomings of MVC. It is composed of three components i.e., Model, View, and Presenter.
The controller serves as a bridge between the view and model layers and therefore provides the application's user interface. As soon as the Model changes, the Controller updates the View.The presenter pulls data from the model and applies the UI  (user interface) logic to determine what to show. In response to the user's input notification, it manages the state of the View and takes appropriate actions.
Controllers and views have a many-to-one relationship since one Controller can SELECT DIFFERENT Views DEPENDING on the operation required.Presenter and View have a one-to-one relationship since the Presenter class manages only one View at a time.
Support for unit testing is LIMITEDThe unit testing process is highly supported.


Discussion

No Comment Found