"Overview"looking at Mr. Jing Jinnan's "ASP. NET MVC framework Revealed", this book explains the principles of MVC in detail, it is very abstruse and very complex, see a few times before you will understand a little. In the first chapter he used an MVC framework he wrote himself as an example, the code looked a bit more, so in order to help understand, I would like to use a step-by-step description of the MVC process, I have limited ability to write bad, but also hope you forgive. If Mr. Jiang saw this article, he would also like to correct my understanding of the wrong place.
First, register the custom HttpModule in Web. config
Second, enter the URL
Third, add the default routing rules
Iv. Registration of Postresolverequestcache Events
v. Analysis of Routedata
Vi. Resolving the requested controller and action
Seven, package RequestContext
Viii. acquisition of Mvchandler
ix. specifying Mvchandler processing HTTP requests
10. Set up controller objects by reflection
11. Set up controller objects by reflection
12. Execute the request with the generated controller object
13. Create action by Reflection
14. Create action by Reflection
15. Display results by custom Rawcontentresult
16. Results show
"Summary"The code used above is from Mr. Jiang's blog downloaded from the source code, after reading the book with a breakpoint step by step with a few times, a little understanding of the process. Make a summary of what Mr. Jiang says: The whole ASP. NET MVC framework is actually implemented by custom Httpmoudle (UrlRoutingModule) and HttpHandler (Mvchandler). hope this article can help more in the study of MVC friends, thank you for your support.