

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of the model-view-controller (mvc) design pattern, its history, and how it separates software applications into three interconnected parts: model, view, and controller. Learn about the roles of each component and their significance in implementing user interfaces.
Typology: Exams
1 / 25
This page cannot be seen from the preview
Don't miss anything!


















What is MVC Model–view–controller ( MVC ) is a software architectural design pattern for implementing user interfaces. It divides a given software application into three interconnected parts
Separation Of Concerns This design pattern separates software application into three interconnected layers which increases the control on our software application.
Model
i. Data Model ii. Business Model iii.View Model
View
Controller The Controller is the part of the application that handles user interaction. Controllers process incoming HTTP requests from users Typically controllers read data from a view, control user input, and send input data to the model. It handles the input, typically user actions and may invoke changes on the model and view.
Life Cycle of Asp.net MVC
ASP.NET MVC Request Pipeline
RouteTable.Routes UrlRoutingMod ule (IHttpModule) Request Route Table
Internally MapRoute method is implemented as var Default = new Route(url, defaults , routeHandler); (^) basically this method (MapRoute) is attach a routeHandler (generator of MvcRouteHandler) with the route. UrlRoutingMod ule (IHttpModule) Request Route Table RouteHand ler (Mvc Route Handler) (^) When the MvcRouteHandler is created one of the things it do is to call the PostResolveRequestCache() method (^) Basically MvcRouteHandler is Responsible for the generation of IHttpHandler (MvcHandler)
Controller / ControllerBase (^) ControllerBase class is an abstract class contains the defination of Execute() and declare ExecuteCore() as abstract method (^) ExecuteCore() method retrive action name from routeData and calls ActionInvoker InvokeAction() method.
Work of ActionInvoker()
ActionResult()
ViewEngine