MVC Architecture Flashcards
What are two security measures provided by browsers to the client?
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.
Explain the MVC architecture when a user submits a login form to when he sees the webpage
-> 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