Open charypar opened 9 years ago
I'm not sure if it would be the right fit for Arch, but I'd love to see a similar state-based approach and DSL that Angular ui-router uses, which I believe was influenced by the router used in the Ember framework. Looks like WebRx is taking this approach. Perhaps it could be abstracted out for usage with Arch.
@cpursley I think we had something vaguely similar in mind for route changes controlled from code. You'd just write a route into the app state. The state machine style transition restriction is quite an interesting concept, we might want to explore that.
But mostly I meant just a basic URL matching definition by this - i.e. limit the possible value of a dynamic route segment, use regular expressions, etc. The reason for needing our own is it needs to work isomorphically, so that's a little challenging.
Either way, thanks very much for the links!
Sure, that makes sense.
The routing API we have now is based on page.js, but it is quite limited. It served us well, but we might want to start thinking about a more extensive DSL, something similar to what Ruby on Rails does, perhaps?