MVC (Model-View-Controller) is a phatrún ailtireachta a scarann feidhmchlár ina thríchuid — Model (sonraí/loighic), View (UI/láithriú), agus Controller (láimhseáil ionchur, comhordú) — ag cur chun cinn scaradh imní. Is patrún bunúsach a thú, le go leor athruithe ann (MVP, MVVM).
Na trí chomhpháirt
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)
