[Zope] url's

Thomas B. Passin tpassin@mitretek.org
Thu, 18 Apr 2002 11:11:51 -0400


[Tom Deprez]

>
> By use of the magic of "traverse_subpath"
> http://www.zopelabs.com/cookbook/1008823295
> you can make it look like this :
> "http://u10190/netwerk/entities/sortBy/Hostname/sortOrder/asc"
>
> which IMHO is a *lot* better
>
> :-)

Yes, but.... if you've a lot more of these variables, then even this url can
become not so fancy anymore.

[Tom P]

Also, it does not conform the the semantics of the http protocol.  The url
ought to be referencing a resource known as "asc",  located at that path.
But that's not really what you are getting.  Of course, you have made it
work, so you could say "so what?"  Does it matter? Maybe... consider the
corresponding version for a descending sort order:

http://u10190/netwerk/entities/sortBy/Hostname/sortOrder/desc

No one, especially a machine (an indexing robot, perhaps) but even a person
would find it hard,  could know that this is just another view of the
"entities" resource.

The query fragment is there to suggest to the server what kind of view of
the resource is desired.  I think it's better to stay with the url semantics
specified for the web, even if you can make the other way work.

Cheers,

Tom P