in Design Patterns by
What is MVC design pattern ?

► Click here to show 1 Answer

0 votes
The Model View Controller (MVC) design pattern specifies that an application consist of a data model, presentation information, and control information. The pattern requires that each of these be separated into different objects.

MVC is more of an architectural pattern, but not for complete application. MVC mostly relates to the UI / interaction layer of an application. You’re still going to need business logic layer, maybe some service layer and data access layer.

UML Diagram MVC Design Pattern


Design components

The Model contains only the pure application data, it contains no logic describing how to present the data to a user.

The View presents the model’s data to the user. The view knows how to access the model’s data, but it does not know what this data means or what the user can do to manipulate it.

The Controller exists between the view and the model. It listens to events triggered by the view (or another external source) and executes the appropriate reaction to these events. In most cases, the reaction is to call a method on the model. Since the view and the model are connected through a notification mechanism, the result of this action is then automatically reflected in the view.
Learn More with Madanswer

Related questions

0 votes
asked Oct 17, 2019 in Design Patterns by Robin