3 ms·
> new It's not all that new. Subdispatch with anonymous functions has been done before: https://metacpan.org/pod/Web::Simple#DISPATCH-STRATEGY https://metacpa
by Mithaldu 12y ago
> new
It's not all that new. Subdispatch with anonymous functions has been done before:
https://metacpan.org/pod/Web::Simple#DISPATCH-STRATEGY https://metacpan.org/pod/Web::Simple#DISPATCH-STRATEGY
As for readability, Roda kinda shoots itself in the code by not having any highlighting on that snippet, but generally yes, you want to keep dispatch trees to small apps. On the other hand, using P/WSGI apps you can stack apps inside one another, scaling trees without getting a moloch. Not clear on whether Roda supports that.
- jeremyevans 12y agoRoda supports stacking apps via r.run to dispatch to any other rack app. You can also use the multi-route plugin, which allows you to split up the routing into subtrees, but keeps the current state.