0% found this document useful (0 votes)
19 views

GP - Node - Architecture - Interview Questions

The document discusses MVC architecture and contains three interview questions and answers about MVC. Q1 defines some key advantages of MVC architecture such as dividing a project into three segments to make development and maintenance easier. Each component has distinct responsibilities. Q2 outlines the typical execution steps of an MVC project including receiving a user request, routing, interacting with controllers and actions, fetching data from models, passing data to views, rendering views, and returning the view to the user. Q3 compares MVC and MVVM, noting differences such as the entry point, interactions between components, access between views and controllers/view models, age of the models, and handling of internal state and data.

Uploaded by

Sahil Dahat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

GP - Node - Architecture - Interview Questions

The document discusses MVC architecture and contains three interview questions and answers about MVC. Q1 defines some key advantages of MVC architecture such as dividing a project into three segments to make development and maintenance easier. Each component has distinct responsibilities. Q2 outlines the typical execution steps of an MVC project including receiving a user request, routing, interacting with controllers and actions, fetching data from models, passing data to views, rendering views, and returning the view to the user. Q3 compares MVC and MVVM, noting differences such as the entry point, interactions between components, access between views and controllers/view models, age of the models, and handling of internal state and data.

Uploaded by

Sahil Dahat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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