What is MVC

From rbachwiki
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

Back To Top- Home - Category