Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share Route UrlBuilders between server and client #526

Open
exyi opened this issue Dec 27, 2017 · 0 comments
Open

Share Route UrlBuilders between server and client #526

exyi opened this issue Dec 27, 2017 · 0 comments

Comments

@exyi
Copy link
Member

exyi commented Dec 27, 2017

As suggested in #523 we should create a mechanism to share implementations of url generation. Now there are two implementations of the route parsers, and although the server-side one is abstracted by RouteBase, if someone would try to implement custom routing syntax it would fail on the client-side. It may consists of translating UrlBuilders to javascript dynamically or sharing same regex which generates url.

I think creating the UrlBuilders as Linq.Expressions would allow us to use them on server and to translate them to JS using the JavascriptTranslator we use for bindings. Parsing of the routes on client-side is not needed (yet...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant