Model-view-controller at large

The whole principle behind the model-view-controller design pattern is relatively simple. Indeed, as shown in the following diagram, it's composed of three blocks: Model, View, and Controller:

Model-view-controller overview

The components are as follows:

  • The Model stores the data required by the application according to commands sent by the Controller.
  • The Controller receives actions from the user (such as the click of a button) and directs model updates accordingly. It can also switch which view is used at any given moment.
  • The View is generated and updated every time the model changes.

And that's it.

Let's ...

Get Angular Design Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.