MVC Flashcards
1
Q
What does MVC stand for?
A
M - Model.
V - View.
C - Controller
2
Q
What does M (Model) represent?
A
The database.
3
Q
What does V (View) represent?
A
The client (browser).
4
Q
What does C (Controller) represent?
A
The server.
5
Q
What does the Model allow you to do?
A
- Adding and retrieving items from the database.
- Processing data from or to the database.
- Speaks only with the Controller.
6
Q
What does the View allow you to do?
A
- This is the only thing the user ever sees.
- Think of good old fashioned HTML/CSS.
- Listens only to the controller. (It never talks back).
7
Q
What doe the Controller allow you to do?
A
- Processes GET/POST/PUT/DELETE requests.
- All server-side logic.
- The Middle Man.
- Takes info rom user.
- Processes info and talks to the database if
needed.
- Receives info from the database.
- Speaks to View to explain presentation to the
viewer.
8
Q
What is route processing?
A
Frameworks all have route processing.
Processes what the user wants, and sends the request to the specific route needed.
Ex. GET/PUT/POST/DELETE.
Then sends request to the controller.