MVC Architecture Flashcards

1
Q

What are two security measures provided by browsers to the client?

A

Cross Origin Resource sharing -> A mechanism that allows a webpage to access different resource while protecting it
form cross site request fogery

Content secuirity policy -> It prevents injection attacks like cross site scripting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain the MVC architecture when a user submits a login form to when he sees the webpage

A

-> The user enters their information on the form(View), and submits the form(to the controller)
-> The controller processes the form data, and makes a reques to the Model to authenticate the user
-> The Model interacts with the database to verify the user and sends the result back to the controller
-> When the controller recieves the result it determines the appropraite result, and and sends a reponse to the view.
-> The view displays/renders the home page or an error message depending on result of authentication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly