Forum OpenACS Q&A: Re: RFC: Avoid exposing object_ids in permanent URLs

Collapse
Posted by Tom Jackson on

Lars,

The internal structure that is exposed is really just the name of the variable 'object_id', or 'message_id', whatever you end up calling it. When you have a million of something, it is going to get pretty ugly pretty fast, so it really doesn't matter. You could nice the url by removing the var name and using a fixed url subdirectory to specify the object number. like:

http://example.com/forums/myforum/123456/one-message
http://example.com/subsite/bugs/3456789/one-bug

The point is, your package_id is exposed in the url, but by way of translation (using a db lookup). This is possible on the scale at which packages are created. It isn't a useful idea on the scale at which objects are created.

OpenACS handles the problem of object identity (and very well). You are trying to substitute something else in a way that will eventually fail. For instance the (package_id, bug_number) is not an identity for the bug. If the package_id is changed, the identity of the bug hasn't changed, just the package the bug is viewed from has changed.

Believe me, I really understand the desire to make urls simple, and rational, and permanent. (For an example check out saleonall.com, which uses the OpenACS3.x ecommerce module to display around 200,000 pages) Using a .vuh handler to do the final translation might be a better solution.