Re: Adding Web Intents to the Webapps WG deliverables

On Thu, Sep 22, 2011 at 3:28 PM, James Hawkins <jhawkins@google.com> wrote:
> When designing the format of the Web Intents action string, we got a lot of
> feedback that the java namespacing is not native to the web and that URLS
> would be a better namespacing scheme.  This gave us the added benefit that,
> by setting precedence with the default list actions, action URLs serve both
> as a namespace mechanism and the page at the URL contains documentation for
> the particular action.  If a developer wants to find out more about
> http://webintents.org/share, all she has to do is visit that URL (try it!).
> If, for example, Twitter decided to add a new action, say 'tweet', they
> could set the action string to http://dev.twitter.com/tweet which would
> contain the input/output specification for this action.

URLs are really, really not a good namespacing mechanism, because URLs
are not names in practice.  Names are compared with string-equality,
generally.  URLs are compared  as URLs, which is a lot crazier.  Is
"http://dev.twitter.com/tweet" the same action as
"http://dev.twitter.com/tweet/"?  What about
"https://dev.twitter.com/tweet" or "//dev.twitter.com/tweet" or
"/tweet" (assume this last one is on a page within dev.twitter.com)?
There's a decent chance that all of these are considered "the same
url" by devs, and devs will probably attempt to use them.  I haven't
even mentioned yet the presence/absence of "www" in urls.

Will this mistake be caught when it doesn't work?  Some of the time,
yeah.  A lot of devs won't go through and test every intent they add.
Even if they do, they may just test with the same incorrect URL they
registered with, and then be bewildered when they're not getting the
traffic they think they should be (and it's even worse for users, who
thought they let the page register for tweeting, but it only works
some of the time, when other devs accidentally use the same incorrect
url).

~TJ

Received on Thursday, 22 September 2011 23:41:34 UTC