Imagine this case:
A color has an id. Easy enough.
The same color can, depending on the user's language pref, search query and personal preference have a different display name.
This display name is not defining, but it needs to be passed on to each page so the user is confronted with the same label every time the color is mentioned.
Furthermore, (and just for keeping this explanation brief, go with me on this one) the name can also be blank (so the parameter is optional).
Since there are many of such parameters and the parameters are optional and I don't want to push all these optional parameters to the ugly query string, I have made a single URL parameter to identify the color that basically puts the color id and the optional parameters in one parameter, separated with a custom delimiter.
Examples:
- Color.mvc/display/123456--BorisRed--AnotherParameter
- Formula.mvc/display/123456--BorisRed--AnotherParameter/987654
I have a helper method that generates this string and one that parses this string.
It's working out fine so far, but I feel there is probably a better way to do this. Any suggestions?