Currently when you ART.compile a route collection, it populates a singular type which means future calls to it will override the routes stored therein. The major limitation of this is it prevents having more than a single router. I.e. you couldn't use it internally without affecting the core application's routes. Or someone using ART::RoutingHandler couldn't be used within an Athena proper application as the routes would conflict.
I'd like to improve this aspect by providing a way to scope routing to specific route collections. Which could be done in a few different ways:
Provide a new matcher type that doesn't compile the routes, but instead just accepts an ART::RouteCollection
Same as 1, but make it the default and have the compiled matcher be its own thing
Move the ART::RouteProvider concept into the public API to allow compiling the routes into a specific namespace.
I'm leaning towards 3 as it's more performant and most likely easiest to implement since you wouldn't need the route collection in hand at all times.
Currently when you
ART.compile
a route collection, it populates a singular type which means future calls to it will override the routes stored therein. The major limitation of this is it prevents having more than a single router. I.e. you couldn't use it internally without affecting the core application's routes. Or someone usingART::RoutingHandler
couldn't be used within an Athena proper application as the routes would conflict.I'd like to improve this aspect by providing a way to scope routing to specific route collections. Which could be done in a few different ways:
ART::RouteCollection
ART::RouteProvider
concept into the public API to allow compiling the routes into a specific namespace.I'm leaning towards 3 as it's more performant and most likely easiest to implement since you wouldn't need the route collection in hand at all times.