Model, View and Friends
Model, View and Friends: MVC: Model, View, Controller, MVVM and Components.
Updated
- MVC: Model, View, Controller (Journeyman): When one function reads the library's data, applies its rules and draws the page, every new screen copies all three jobs and the copies drift apart; MVC splits them into a model (the data and the rules), views (how it's shown) and a controller (what a request does), so a new screen is a new view and a rule lives in one place.
- MVVM and Components (Journeyman): When a screen's code has to update every label by hand after each change, one change sooner or later forgets one and the screen shows something untrue; MVVM puts the screen's state and rules in a view model that tells the view when it changes, so the view, bound to it, redraws itself, and a component in Angular or React bundles a view with its view model.