In this article we will discuss about the MVC application lifecycle and how the request is processed as it passes from one component to the other. We will talk about the components in the order they occur in the application lifecycle .We will also look into the role of each of component and how they are related to the other component's in the pipeline.
As developers we are aware about some of the components used by the MVC framework to process the request. Mostly we work with the controllers and the action methods.
Also we work with the different ActionResult's and the Views . But are we aware about the other important components involved in the request processing?. And how the request flows in the request pipeline?
When I started learning MVC one of the things I could not understand was how the request flows from one component to the other.Also I was not clear about the role of HTTP module and the HTTP handler in the request processing.After all MVC is a web development framework so there has to be HTTP module and the HTTP handler involved somewhere in the pipeline.
We have more components involved in this request processing pipeline then we know of , the controller and the action methods that we work with, that have an equally important role in the request processing.
Though most of the time we can use the default functionality provided by the framework but if we understand what is the role of each of the component we can easily swap the components or provide our own custom implementations.
The main components and their role in the Request pipeline.
Let us see what happen's when the request if first made for a resource in an MVC application