System Design
3. Client-Server ArchitectureAnimated
Model-View-Controller (MVC)
Separates data, display and input handling.
The idea
The controller handles input, updates the model, and the view renders the model.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
The user acts on the page.
- step:
- 1/4
- at:
- User
1/8
The green dot is a request moving through the system.
Step by step
- 1User acts on the view
- 2Controller handles the action
- 3Model changes
- 4View updates
Where it is used
Web frameworks.
Watch out for
Controllers grow fat unless logic stays in the model or services.