U4-104 - Rewrite request pipeline

Created by Shannon Deminick 09 Jul 2012, 22:34:12 Updated by Sebastiaan Janssen 31 Oct 2012, 09:15:33

Is duplicated by: U4-60

Parent for: U4-807

Parent for: U4-808

Parent for: U4-809

Parent for: U4-810

Parent for: U4-811

Stephan has already started and pretty much finished the request handling part of this. What currently happens though needs to change:

  • HttpModule handles request, does some random bits and pieces of parsing the URL, etc..
  • Passes request to default.aspx
  • requestModule then gets used to lookup the current node and all sorts of other stuff
  • eventually the resolved model gets handed off to the view (webforms)
  • At some stage here the localization language is set during the default.aspx execution

What needs to happen is:

  • HttpModule handles request
  • Passes request information to the new Request Handler (whatever it might be called, think Stephan has already named it something) which does everything such as: ** looks up the node item ** sets the localization ** (yes I'm probably missing a bunch of other important stuff here :) ** Returns a model structure of the resolved data
  • Then the HttpModule has all of the data it needs and finally passes this data off to the default.aspx
  • The default.aspx then just handles a page request as per normal webforms, it doesn't do 'everything' since its far too late in the request pipeline

Moving forward, this allows us to implement MVC since the HttpModule will continue to work exactly the same but when it's resolved the data structure from the new request handler, it will determine whether to pass of the request to webforms (default.aspx) or MVC. Just like it is done in umbraMVCo.


Shannon Deminick 09 Jul 2012, 23:44:20

This code should exist amongst the new APIs, be unit testable and also have some unit tests.

Scott Williams 10 Jul 2012, 11:38:43

would it make sense to provide a mechanism to determine the rendering pipeline from the file extension of the template file or from a setting on the template object?

So in the backoffice you can set what sort of rendering engine to use on a template by template basis allowing a mix mash of rendering engines in a single system.

Also to allow for pluggable routing we could have a ITemplateResolver that can be used to determin the template that a particular request uses and the the further pipeline then renders using the correct Rendering pipeline.

ITemplateResolver could be used for things like rendering a mobile templete if the request pipes in a mobile user agent, or if the request was for an ajax request it could route to a raw json output based template (using a plugged in raw json rendering engine).

Stephan 10 Jul 2012, 19:19:32

At the moment the new pipeline will transfer to default.aspx and use masterpage templates. But, it will do so in a clearly identifiable place, so pluggin in different rendering engines (default.aspx, MVC, template resolver...) should not be difficult.

Stephan 14 Jul 2012, 16:54:53

First draft commited in http://umbraco.codeplex.com/SourceControl/network/forks/sgay/ZBU1, please read http://goo.gl/YPoHi for more details and comment!

Priority: Task - Pri 1

Type: Feature (planned)

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category: Architecture

Backwards Compatible: False

Fix Submitted:

Affected versions:

Due in version: 4.10.0


Story Points: