I have a single page application with some static routes, for example:
example.org/#!/tools/ example.org/#!/stories/story-1/
These are examples of routes that do not need version control. Either the "page" exists, it is redirected, or it is missing.
But then I have other resources that I would like to use for the version (because they can have internal states, indicated by about 10 parameters):
example.org/#!/tools/population-tool/+ ? a = b & c = d [...]
Since querystring parameters can change over time (because the tool can resolve more parameters), I would like to add a version parameter to these "pages":
example.org/#!/tools/population-tool/+? v = 1.1 & a = b & c = d [...]
Thus, when the user navigates to the URL without any parameters, the default state and version are automatically added:
example.org/#!/tools/population-tool/ => example.org/#!/tools/population-tool/ + version + default state
In case the user decides to share / mark this URL, the paramater parameter will always allow me to reassign the parameters from one version to another.
- Can you suggest a better approach?
Perhaps the version should be part of the URL for all routes?
example.org/#!/ v1 / tools / population tool /
Or maybe query verification is the wrong approach at all? Perhaps I should have a method that has the right "API" based on the specified parameters?
Thanks.
source share