Adam Taft wrote:
Erik Hetzner wrote:
You beat me to it! Just to add, the RWS book suggests using commas for
ordered pairs in the URI design section, which makes sense to me.

Really??  That's weird.  Wrong even?

Not entirely - RWS only suggests it for pairing elements at the same level of hierarchy.

I mean, if you can (or should) use commas, we'd have urls like this:

/cars,ford,truck,f-series,f150,2007

instead of

/cars/ford/truck/f-series/f150/2007

I like the second (with slashes) because it's somewhat a metaphor for traditional folders on a hard drive. Which is why it's also congruent with a web server serving a static folder hierarchy.

Ultimately, it doesn't matter what your delimiter is. I just think slashes seem more intuitive for this type of "ordered" or "hierarchical" usage.

Ordered does not necessarily mean hierarchical. The example in the book is latitude and longitude. Neither is the parent of the other, but to differentiate them easily we use a convention that puts them in a particular order.

Likewise I think "from language" and "to language" are not hierarchical, you could just as easily order them the other way.

Regards,
Michael.

Reply via email to