codethinked (kōdthĭngked) adj. To be consumed by or obsessed with code.

ASP.NET MVC Request Flow

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.

image

I hope that this helps someone out!

Comments

Chris Stewart

Great talk the other night.  Definitely appreciate you putting on the event.

Chris Stewart

September 27. 2008 23:37

United States
Rajesh Pillai

Just came across this blog and the request flow diagram is just what was required for me...

Thanks.
Rajesh Pillai

Rajesh Pillai

September 28. 2008 04:59

pingback

Pingback from alvinashcraft.com

Dew Drop – September 28, 2008 | Alvin Ashcraft's Morning Dew

alvinashcraft.com

September 28. 2008 05:52

Justin Etheredge

@Chris Thanks! I thought the talk went really well.

@Rajesh Glad it helps out.

Justin Etheredge

September 28. 2008 10:21

United States
trackback

Trackback from gOODiDEA.NET

Interesting Finds: 2008.09.29

gOODiDEA.NET

September 28. 2008 19:44

trackback

Trackback from gOODiDEA

Interesting Finds: 2008.09.29

gOODiDEA

September 28. 2008 19:44

pingback

Pingback from blog.cwa.me.uk

Reflective Perspective - Chris Alcock  » The Morning Brew # 189

blog.cwa.me.uk

September 29. 2008 00:11

trackback

Trackback from DotNetKicks.com

ASP.NET MVC Request Flow

DotNetKicks.com

September 29. 2008 11:32

Daniel

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

September 30. 2008 10:14

United States
Justin Etheredge

@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.

Justin Etheredge

September 30. 2008 13:07

pingback

Pingback from code-inside.de

HowTo: ASP.NET MVC erstellen (erster Einstieg) | Code-Inside Blog

code-inside.de

October 14. 2008 14:07

Add Comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading