Module Routing Function API Refactor #112

cliftonc opened this Issue Sep 27, 2011 · 0 comments


None yet
1 participant

cliftonc commented Sep 27, 2011

At the moment, once a route is matched within a module, it makes a call back to the routing function like this:

Route defined:

    module.router.addRoute('GET /', homePage, {template:'list', block:'content.home'}, this.parallel());

Callback when matched:

    function homePage(req, res, template, block, next) {}

Before we get too many modules, I am considering refactoring this to make it more future proof, e.g.

    function homePage(req, res, options, next) {}

where in this example, options = {template:templateFn, block:'content.home'}

It would involve changes to every module (not a big deal at the moment as there are only about 15 of them), but will make it much more flexible going forwards.

? If I don't get any comments I'll assume that silence gives consent!


cliftonc was assigned Sep 27, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment