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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.