Three layers
- Model — data and business logic: database interaction, validation, calculations. Knows nothing about how data will be displayed
- View — a template that turns data into HTML (or JSON). Contains no logic — display only
- Controller — receives the HTTP request, calls the right model, passes the result to the view. A thin conductor layer
The "thin controller" rule
Controllers should contain no business logic — only orchestration. If a controller method exceeds 10–15 lines, that is a signal to move the logic into a service or model.