Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the legend of the arrows in these diagrams (MVC - MVP - MVVM)?

I try to understand the main differences between MVC / MVP and MVVM patterns. I found these 3 diagrams but I'm not sure to understand them. Coul you help me and explain me what is the legend of the dashed line and continuous line.

MVC from Wikipedia definition

MVC from Wikipedia definition

MVP from Microsoft MSDN website

MVP from Microsoft MSDN website

MVVM from Microsoft MSDN website

MVVM from Microsoft MSDN website

like image 534
Bastien Vandamme Avatar asked Mar 15 '12 17:03

Bastien Vandamme


People also ask

What is MVC MVP and MVVM pattern?

MVC (Model — View — Controller), MVP (Model — View — Presenter), and MVVM (Model — View — ViewModel) is the most popular and industry-recognized android architecture pattern among developers.

What is MVP and MVC?

MVC(Model View Controller) MVP(Model View Presenter. One of the oldest software architecture. Developed as the second iteration of software architecture which is advance from MVC. UI(View) and data-access mechanism(Model) are tightly coupled.

What is the MVP design pattern?

Model View Presenter (MVP) The MVP pattern is similar to the MVC pattern. It is derived from MVC pattern, wherein the controller is replaced by the presenter. This pattern divides an application into three major aspects: Model, View, and Presenter.

What is MVP MVVM?

MVP(Model View Presenter) MVVM(Model View ViewModel) It resolves the problem of having a dependent View by using Presenter as a communication channel between Model and View. This architecture pattern is more event-driven as it uses data binding and thus makes easy separation of core business logic from the View.


1 Answers

  • Solid lines are direct calls.
  • Dashed lines are only event callbacks.

Main differences between MVC and MVP (Passive view) patterns:

  • In MVC view knows about model (calls getData() etc. to display data)
  • In MVP (Passive view) the view does not know about model. Presenter passes data from model to view.

More details in:

  1. MVC vs MVP vs MVVM
  2. In depth description by Martin Fowler: GUI Architectures
like image 141
Andrejs Avatar answered Sep 28 '22 03:09

Andrejs