Difference between revisions of "What is MVC"

From rbachwiki
Jump to navigation Jump to search
(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...")
 
 
Line 22: Line 22:
** Receives info from DB
** Receives info from DB
** Speaks to the View to explain presentation to the viewer
** Speaks to the View to explain presentation to the viewer
----
[[#MVC - Model View Controller|Back To Top]]-[[Main_Page| Home]] - [[PHP|Category]]

Latest revision as of 16:06, 17 August 2016

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

Back To Top- Home - Category