MVC
Oh MVC, good ol' MVC. You served us well for many years. Now, people want you to retire, without fuss if possible. Even I can see how younger, unidirectional user interface architectures can outsmart you and make you look like a relic from the past.
In this section, we'll first describe what the model-view-controller is, regardless of the programming language used to implement it, and then we'll see the shortcomings of applying MVC for frontend programming. Finally, I'll present a way of implementing an MVC that makes sense with Angular in terms of ease of implementation, maintenance, and performance.
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...