3 ms·
Welcome Roda and congrats for this new innovative routing idea. As much as I see some value in a tree-like routing definition in this nice comparison with Sin
by diminish 12y ago
Welcome Roda and congrats for this new innovative routing idea. As much as I see some value in a tree-like routing definition in this nice comparison with Sinatra, http://roda.jeremyevans.net/why.html http://roda.jeremyevans.net/why.html, Sinatra's routing approach still appears to be more readable and manageable. Maybe Sinatra could optimize the storage of the routing entries internally in a tree to make it as fast as Roda (if it doesn't already do).
- 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.