Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2165 (closed enhancement: fixed)

Opened 10 years ago

Last modified 9 years ago

Refactor dispatch

Reported by: percious Owned by: percious
Priority: normal Milestone: 2.1rc1
Component: TurboGears Version: trunk
Severity: normal Keywords: dispatch routes pycon
Cc:

Description

Dispatch currently resides as a large set of cascaded functions. There is only one method for dispatch and it cannot be overridden by the developer.

I'm proposing that all dispatch method is encapsulated inside ObjectDispatch? and RestDispatch?, allowing developers to create their own custom dispatch. It works like this:

Dispatch begins with the RootController?, which is always Object Dispatch. Then, the dispatch is passed off to each Dispatch object in turn. Dispatch continues down the branches of the URL. At each branch, dispatch will detect if the next object in the chain has it's own dispatcher, and if it does, the method of dispatch continues on with this new method. Along the way, a chain of controller object references is kept in-memory so that any time the dispatch can see how it got where it is.

This will be backwards-compatible, and allow for people to develop their own different kinds of dispatch.

I expect this to be completed during PyCon? 2009.

Change History

comment:1 Changed 10 years ago by percious

  • Type changed from defect to enhancement

comment:2 Changed 10 years ago by jorge.vargas

  • Milestone changed from 2.0 to 2.0b6

if this is going to happen it has to be in the last beta.

comment:3 Changed 10 years ago by mramm

  • Milestone changed from 2.0b6 to 2.1

comment:4 Changed 10 years ago by jorge.vargas

  • Keywords pycon added

comment:5 Changed 10 years ago by percious

  • Status changed from new to closed
  • Resolution set to fixed

comment:6 Changed 9 years ago by percious

  • Milestone changed from 2.1 to 2.1rc1
Note: See TracTickets for help on using tickets.