I gave a presentation Thursday at the Richmond Meet and Code. This presentation covered Microsoft’s new web app framework “ASP.NET MVC”. My presentation was actually quite short, but one of the things I wanted to show was the flow of a request into System.Web.Routing and through System.Web.MVC. I looked around on the web and I could not find one, so I ended up creating one. I decided to go ahead and reformat it to fit on the blog.
This graphic shows the user sending in a url, and a Route being matched inside of the RouteCollection. I glossed over this part a bit, but what I wanted to highlight was the Url and RouteHandler that the Route class held. This is the way in which the request is passed from System.Web.Routing over to System.Web.Mvc. Once it gets into System.Web.Mvc I tried to show all of the major classes involved and the method that is invoked on each.
I hope that this helps someone out!
Loved the article? Hated it? Didn’t even read it?
We’d love to hear from you.
Great talk the other night. Definitely appreciate you putting on the event.
Just came across this blog and the request flow diagram is just what was required for me…
@Chris Thanks! I thought the talk went really well.
@Rajesh Glad it helps out.
This is helpful, but I’m still a little fuzzy on what happens to my ActionResult – how it magically picks a view and renders it. I’d assume Execute() does something with it, but maybe you could add the return path after InvokeAction to the diagram?
@Daniel When you just return "View()" from an action it is going to pick a View that has the same name as the action being invoked and within the proper folder for the controller you are in. But you can also specify a view name if you want.
Can I steal that graphic and share with others? Will NOT be posted on any public website.
Yeah, feel free to use it wherever you want, just provide attribution. Be aware that the image might be a little dated now, that was done based on MVC1.
Hi, I am unable to see the image. Can you please post it again??
Leave a comment