What is MVC

From rbachwiki
Revision as of 16:00, 17 August 2016 by Bacchas (talk | contribs) (Created page with "== MVC - Model View Controller == === The Model === Interacting with the Data * Adding and retrieving items from DB * Processing data from or to the database * Speaks only wit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

MVC - Model View Controller

The Model

Interacting with the Data

  • Adding and retrieving items from DB
  • Processing data from or to the database
  • Speaks only with the Controller

The View

Displaying to the user

  • This is the only thing the user ever sees
  • The Web Page
  • Speaks only to the Controller

Controller

Interacting with the user

  • Processes GET/POST/PUT/DESTROY request
  • All server-side logic
  • The Middle Man
    • Takes info from the user
    • Processes info and talks to the DB if needed
    • Receives info from DB
    • Speaks to the View to explain presentation to the viewer