Web Application Development
MVC Framework
Introduction
11/19/2025 Web Application Development 2
What is MVC?
The Model-View-Controller (MVC) framework is an
architectural/design pattern that separates an application
into three main logical components Model, View,
and Controller. Each architectural component is built to
handle specific development aspects of an application. It
isolates the business logic and presentation layer from
each other. It was traditionally used for desktop graphical
user interfaces (GUIs). Nowadays, MVC is one of the
most frequently used industry-standard web development
frameworks to create scalable and extensible projects. It is
also used for designing mobile apps.
MVC was created by Trygve Reenskaug. The main goal
of this design pattern was to solve the problem of users
controlling a large and complex data set by splitting a
large application into specific sections that all have their
own purpose.
11/19/2025 Web Application Development 3
Features of MVC :
• It provides a clear separation of business logic,
Ul logic, and input logic.
• It offers full control over your HTML and URLs
which makes it easy to design web application
architecture.
• It is a powerful URL-mapping component using
which we can build applications that have
comprehensible and searchable URLs.
• It supports Test Driven Development (TDD).
11/19/2025 Web Application Development 4
Components of MVC :
The MVC framework includes the following 3
components:
• Controller
• Model
• View
11/19/2025 Web Application Development 5
11/19/2025 Web Application Development 6
Controller:
The controller is the component that
enables the interconnection between the
views and the model so it acts as an
intermediary. The controller doesn’t have to
worry about handling data logic, it just tells
the model what to do. It processes all the
business logic and incoming requests,
manipulates data using
the Model component, and interact with
the View to render the final output.
11/19/2025 Web Application Development 7
View:
The View component is used for all the UI
logic of the application. It generates a user
interface for the user. Views are created by
the data which is collected by the model
component but these data aren’t taken
directly but through the controller. It only
interacts with the controller.
11/19/2025 Web Application Development 8
Model:
The Model component corresponds to all
the data-related logic that the user works
with. This can represent either the data that
is being transferred between the View and
Controller components or any other business
logic-related data. It can add or retrieve data
from the database. It responds to the
controller’s request because the controller
can’t interact with the database by itself.
The model interacts with the database and
gives the required data back to the
controller.
11/19/2025 Web Application Development 9
Working of the MVC framework
with an example:
Let’s imagine an end-user sends a request to a
server to get a list of students studying in a
class. The server would then send that request
to that particular controller that handles
students.
That controller would then request the model
that handles students to return a list of all
students studying in a class.
11/19/2025 Web Application Development 10
11/19/2025 Web Application Development 11
The model would query the database for the list
of all students and then return that list back to
the controller. If the response back from the
model was successful, then the controller would
ask the view associated with students to return a
presentation of the list of students. This view
would take the list of students from the
controller and render the list into HTML that can
be used by the browser.
11/19/2025 Web Application Development 12
The controller would then take that presentation
and returns it back to the user. Thus ending the
request. If earlier the model returned an error,
the controller would handle that error by asking
the view that handles errors to render a
presentation for that particular error. That error
presentation would then be returned to the user
instead of the student list presentation.
As we can see from the above example, the
model handles all of the data. The view handles
all of the presentations and the controller just
tells the model and view of what to do. This is
the basic architecture and working of the MVC
framework.
11/19/2025 Web Application Development 13
Reference
[Link]
tion/
[Link]
ntroller-pattern-mvc-architecture-and-frameworks-explai
ned/
11/19/2025 Web Application Development 14