Skip to content

Latest commit

 

History

History
59 lines (52 loc) · 2.1 KB

TODO.org

File metadata and controls

59 lines (52 loc) · 2.1 KB

gudu todos

Fixes

Change usage of cond for different segment types to use a protocol

Handle being inside a servlet container (i.e. handle non root context)

Requirements

New segment types

string

int

regex

static choice (i.e. set of strings)

catch all/multi segment (e.g. wiki)

custom/user defined

date segments (example of custom?)

Consume 3 segments e.g. /2013/03/21 but only return one param (map or Java Date?)

New Features

Router that auto maps: /<namespace>/<function>/<args> => (apply namespace/function args)

Notes: see find-ns, find-var, symbol

Wrappers/Decorators that convert (and simplify) input to gu & output from du

  • e.g.: [:a :b] = :a-b [:a :b] = :b
  • Questions:
    1. Implement as middleware?

Functions to walk routes

Route debugging

Route linter

Rules:

No duplicate/overlapping segment URLs

e.g. { :a [“a”], :a2 [“a”] } { :s [segment/string], :i [segment/int] } Note: overlapping segments (but not entire URL) is ok. e.g. { :z [“x” “y” “z”], :a [“x” “y” “z” “a”], :b [“x” “y” “z” “b”] }

Client side routes generation

Generate navigation (as hiccup?) from routes

Generate breadcrumb based on current URL

Change routes at runtime

Note: what does this mean for gu, i.e. can you generate routes for other route configurations?

Minor Features

Pass context through from gu/du to anonymous functions, allow it to be overridden

Allow keywords for defining static route segments (as well as strings)

Helper functions to map routes to handlers

Add some way to specify the default handlers (e.g. 404, 500)

Refactoring

Move segments to gudu.segment

Documentation

Generate docs (marginalia or codox)

Publish docs (gh-pages)

Examples

Blog (using date segments)

Wiki (using multi segment)

Database backed (custom segment that 404s if id not in database)

git browser (using custom segment that can do partial matches)