Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

1. What is MVC?

- Model-View-Controller (MVC) is an architectural pattern that separates an application

2. Give the definition of the parts of the MVC.

Model – The model components correspond to all the data-related logic that the user works
with and represent either the data that is being transferred between the View and Controller
components or any other business logic-related data.

View – The view components is used for all the UI logic of the application.

Controller – Controllers act as an interface between Model and View components to process all
the business logic and incoming requests, manipulates data using the Model component and interact
with the Views to render the final output.

3. What is the workflow in MVC?


User > Controller > Model > View

- The user sends a request to the application, such as by clicking a link or entering a URL in
the browser.
- The request is routed to the appropriate controller
- The controller retrieves the data from the model
- The controller updates the model, if necessary
- The controller passes the data and sends it back to the user

4. What is dependence hierarchy in MVC?


- The way in which the different parts of the application depend on each other

You might also like