Change usage of cond for different segment types to use a protocol
Handle being inside a servlet container (i.e. handle non root context)
static choice (i.e. set of strings)
catch all/multi segment (e.g. wiki)
date segments (example of custom?)
Consume 3 segments e.g. /2013/03/21 but only return one param (map or Java Date?)
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:
Implement as middleware?
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
Note: what does this mean for gu, i.e. can you generate routes for other route configurations?
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)
Move segments to gudu.segment
Generate docs (marginalia or codox)
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)