0% found this document useful (0 votes)
35 views10 pages

Niversity: Abdul Majid Niazai

The document discusses the Model-View-Controller (MVC) pattern in ASP.NET MVC. It describes the MVC pattern as separating an application into three main components: the Model, the View, and the Controller. The Model manages the application's data logic and state, the View creates the user interface, and the Controller handles user input and interaction between the Model and View. When a user enters a URL, the request is routed to a controller which executes the related view and model to generate and return a response to the browser.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views10 pages

Niversity: Abdul Majid Niazai

The document discusses the Model-View-Controller (MVC) pattern in ASP.NET MVC. It describes the MVC pattern as separating an application into three main components: the Model, the View, and the Controller. The Model manages the application's data logic and state, the View creates the user interface, and the Controller handles user input and interaction between the Model and View. When a user enters a URL, the request is routed to a controller which executes the related view and model to generate and return a response to the browser.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

HE W A D UNIVERSITY

Asp.net
Abdul Majid Niazai
[email protected]
ASP.NET MVC

 The MVC (Model-View-Controller) is an application development pattern or


design pattern which separates an application into three main components:
 Model
 View
 Controller
Model
 Model: Model is a part of the application which implements the logic for the
data domain of the application. It is used to retrieve and store model state in
a database such as SQL Server database. It also used for business logic
separation from the data in the application.
View
 View: View is a component that forms the application's user interface.
It is uses to create web pages for the application. An example would
be an edit view of a Products table that displays text boxes, drop-
down lists and check boxes based on the current state of a Product
object.
Controller
 Controller: Controller is the component which handles user interaction. It
works with the model and selects the view to render the web page. In an MVC
application, the view only displays information whereas the controller handles
and responds to the user input and requests.
user's request in ASP.NET MVC

The above figure illustrates the flow of the user's request in ASP.NET MVC.
Advantages of ASP.NET MVC Framework
This approach provides the following advantages.
 It manages application complexity by dividing an application into the model,
view and controller.
 It does not use view state or server-based forms. This makes the MVC
framework ideal for developers who want full control over the behavior of an
application.
 It provides better support for test-driven development.
 It is suitable for large scale developer team and web applications.
 It provides high degree of control to the developer over the application
behavior.
note

 As per the above figure, when a user enters a URL in the browser, it goes to
the webserver and routed to a controller. A controller executes related view
and models for that request and create the response and sends it back to the
browser.
Points to Remember

 MVC stands for Model, View and Controller.


 Model represents the data
 View is the User Interface.
 Controller is the request handler.
End of Chapter 10

You might also like