Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Interview Questions

MVC Architecture

Q1. What are some of the advantages of MVC Architecture?


(Robosoft Technology)
Answer:
● MVC divides our project into three different segments, and it becomes easy
for developers to work on them.

● It is easy to modify or change some portion of our application that


decreases the development time and maintenance cost of the application.

● MVC makes your project more systematic and structured, and easy to
maintain and manage.

● Each MVC component has different responsibilities, i.e. Models handle the
Data Logic and perform CRUD operations on the database, Views handle
the design logic and render the UI after modifying the template with
appropriate data, and the controller handles all the interactions between
view and model and acts as the central system and manages all the
requests and responses.

Q2. What are the steps for the execution of an MVC project?
(UPLERS)
Answer:
● Receive User Request.
● Perform Routing.
● Redirect to Desired Controller and then to the Desired Actions in the Controller.
● Fetch Data from the Database through Models if Required.
● Pass necessary information to the views and modify the template.
● Render the View.
● Return the Rendered View and Display it to the user.

1
Q3. Differentiate between MVC and MVVM?
(ACCENTURE)

Answer:

MVC MVVM

A Controller is the entry point to The View is the entry point to the
the Application. Application.

One Controller can interact with One ViewModel can interact with
different Views different Views

View does not have direct access View have direct access to the
to the Controller View-Model.

MVC is a relatively Old Model MVVM is a relatively New Model.

Difficult to read, change, reuse The debugging process gets


this Model. complicated when we use
complex data bindings.

Each Request has to go through Stores Internal State and Data


the controller after routing to and temporary modifications
modify data. don’t need to go through the
controller.

You might also like