Here is the problem I need to solve. I have a web application that basically allows the user to query some server data source and see the query results - a kind of reporting application. A query can be created by the user by specifying values for several predefined parameter types. Suppose A1 .... AN is a list of possible parameters, so the query will look like this: A1 = "some_value" & A2 = "some_other_value" & ... & AN = "whatever" *. I need a way to share these requests between app users, a kind of “bookmark feature”. I can foresee two different approaches that can be used to solve this problem:
Include request in URL. So I would have something like * http://www.myapp.com/q=possibly_very_very_very_long_string* as a URL that can be shared between people. Personally, I do not like this approach. A long URL can be messy. Sending it by e-mail or any other transport, copying / pasting, etc., of course, will lead to poor user experience.
Use server memory to map these long "URLs" to some more user-friendly ones. A trivial example would look something like this: http://www.myapp.com/q=12345, where 12345 will be the identifier of this request in the application database. This approach looks more attractive to me.
What do you think about this? Maybe I missed something?
source
share