Current location - Health Preservation Learning Network - Healthy weight loss - Comparison of MVC, MVP and MVVM in Android
Comparison of MVC, MVP and MVVM in Android
MVC, MVP and MVVM are three common architectural design patterns. At present, MVP and MVVM are widely used. Of course, MVC is not out of date.

MVC (Model-View-Controller), the standard MVC is like this:

Brief description:

Disadvantages:

MVP (Model-View-Presenter) is an evolved version of MVC, and its main parts are as follows:

Brief description:

Explanation:

Advantages:

Disadvantages:

MVVM is the abbreviation of model-view-view model. Compared with MVP mode, MVVM mode uses ViewModel instead of Presenter, and other layers are basically the same as MVP mode. ViewModel can be understood as the combination of data model of view and Presenter. MVVM abstracts the state and behavior of the view, so let's separate the view UI from the business logic.

Brief description:

Disadvantages:

Reference: