ASP.NET MVC Pipeline And Extensibility
ASP.NET MVC is designed with extensibility in mind and almost every part of processing pipeline is extensible using your own providers to replace the standard implementation. Simone Chiaretta, in his blog post “An Introduction to ASP.NET MVC Extensibility” gives an introduction to various stages in the ASP.NET MVC Pipeline, and a brief explanation of how extensibility comes into picture.
The ASP.NET MVC Pipeline can be divided into the following parts -
- Routing Part – Routing module tries to match the incoming URL with the routing table, and calling the corresponding IRouteHandler.
- Controller creation – the IControllerFactory creates an instance of the controller based on route parameters and default naming conventions.
- Action Execution – the IActionInvoker identifies the method to be executed, the IModelBinder validates and binds the method parameters and the IFilterProvider discovers filters to be applied. The Action returns a type ActionResult.
- View – the IViewEngine instantiates the correct view engine and the model is passed to the view. Using Model Validation Provider, the validation rules are retrieved to create client-side validation scripts as well as remote validation scripts
Every interface in the above pipeline can be implemented as a custom provider to replace the default implementation, using extensibility. Simone explains the different types of extensions, based on their purpose, and promises to cover each of these in more detail in subsequent articles -
- Essentials – custom templates, server and client side validations and HTML helpers
- Productivity enhancers – base controller with new conventions, AJAX helpers, URL helpers, Action/Result Filters
- Case Specific – for solving specific problems – route constraint, route handler, Action result, model binder and ActionMethodSelector
- Core Extensions – Controller Factory, Action Invoker, View Engine, Model Validation Provider, Model Metadata Provider
Do checkout the article for a much more detailed explanation.
ASP.NET MVC (Model-View-Controller) is a patterns based way to build dynamic websites in ASP.NET, as an alternative to the event-driven web-forms. It helps in clear separation of concerns and gives full control over the html markup.
Educational Content
Building Hypermedia APIs with HTML
Jon Moore Jun 19, 2013
Deleting Code at Nokia
Tom Coupland Jun 19, 2013
Intro to CLP with core.logic
Ryan Senior Jun 18, 2013
Spock: A Highly Logical Way To Test
Howard Lewis Ship Jun 18, 2013
Java Garbage Collection Distilled
Martin Thompson Jun 17, 2013




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think