URI Design at Yahoo!


Seems like Jon Udell has got lots of people are thinking about URI design right now.  I posted something last week in response to Jon's post and now Jeremy Zawodny has done the same regarding Yahoo! Finance.  I think that some of the changes that they're contemplating regarding XML are fascinating and much needed.  Jeremy asks for an opinion on three different design options for Yahoo! Finance URLs:

The bulk of the argument boiled down to roughly something like this:

1. http://finance.yahoo.com/xp?YHOO

Or...

2. http://finance.yahoo.com/x/p?YHOO

Or...

3. http://finance.yahoo.com/x/p/YHOO

That's right. We spent a long, long time arguing about the difference between a slash ('/'), or question mark ('?'). And we argued passionately for our favorites.

Like any self-respecting academic, my answer is "it depends."  Here's how I think it shakes out.  If the only thing you're doing is quotes, then I'm not sure it matters a great deal which of these options.  In general, I don't like using PATH information for arguments, but that's more style than anything.  If you've got a more complicated set of features than just returning quotes, then I don't like any of these.  I like

1. http://finance.yahoo.com/xp?q=YHOO&p2=X2&...&pn=Xn

OR

2. http://finance.yahoo.com/xp/YHOO?p1=X1&...&pn=Xn

The nice thing about (2) is that its eminently guessable and simple to remember but allows for the addition of parameters to change the default behavior. 

In any event, I believe that the whole set up ought to be carefully documented and that document ought to be available online and, preferably in machine readable form.  The problem with the "machine readable" part is that WSDL isn't up to this task (built for something else) and nothing else has emerged as a strong contender.  Maybe Yahoo! has enough clout to take something like Paul Prescod's WRDL and make it a de facto standard? 


Please leave comments using the Hypothes.is sidebar.

Last modified: Thu Oct 10 12:47:20 2019.