MVC (Model-View-Controller) is an architectural pattern that separates an application into three parts — Model (data/logic), View (UI/presentation), and Controller (handles input, coordinates) — promoting separation of concerns. It's foundational, with many variations (MVP, MVVM).
The three components
MODEL → data and business LOGIC (the core: data, rules, state) — independent of the UI
VIEW → the UI/PRESENTATION (displays data to the user) — what the user sees
CONTROLLER → handles user INPUT, coordinates between Model and View (processes requests,
updates the model, selects the view)
→ SEPARATION: data/logic (Model) ≠ presentation (View) ≠ input handling (Controller)
