W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: xdash name prefixes (was Re: Component Model Update)

From: Dominic Cooney <dominicc@chromium.org>
Date: Wed, 31 Aug 2011 12:57:52 -0700
Message-ID: <CAHnmYQ93KVj+t=EbOJuTV8xwWMcUOyABVKpmxKJZQp8hw+uNLg@mail.gmail.com>
To: Roland Steiner <rolandsteiner@google.com>, Adam Barth <w3c@adambarth.com>
Cc: Dimitri Glazkov <dglazkov@chromium.org>, public-webapps <public-webapps@w3.org>, Maciej Stachowiak <mjs@apple.com>, Jonas Sicking <jonas@sicking.cc>, Boris Zbarsky <bzbarsky@mit.edu>
I think for convenience registration probably should be carried around
with the component, because:

1. It is convenient for the author using the component.

2. If the component library reuses its own abstractions, it probably
expects them to have a specific element name. Putting registration in
the hands of the author using the component jeopardizes that.

However I don’t think the imperative API is right, or at least not
enough, for these reasons: (assuming you accept that registration
happens in the component library—the death before inconvenience
premise):

1. The imperative registration API is *not* OK for confined
components, because if you run script out of the library in your
context to do the registration, you are hosed.

2. There’s no way for the author to manage conflicts or namespace pollution.

Something declarative like module imports and exports, with scoped
renaming, for registered tag names would be nice. This avoids these
two problems, and is pretty convenient (particularly if import * gets
you all of the exports by default.)

Dominic

On Wed, Aug 31, 2011 at 10:54 AM, Roland Steiner
<rolandsteiner@google.com> wrote:
> On Fri, Aug 26, 2011 at 11:18 AM, Adam Barth <w3c@adambarth.com> wrote:
>>
>> Doesn't it seem more likely that the third-party will do the
>> registration in whatever script you include that implements the Like
>> button, or whatever?
>
> That's just a matter of convention, no? I don't think it's unreasonable to
> frame it as "in order to use a component you need to load its source and
> register a suitable element name for it.".
> OTOH, there's nothing to prevent a package from doing the registering in one
> go. But if such a package then really leads to a clash, I'd prefer to first
> ask the authors to sort it out.
>
> Cheers,
> - Roland
Received on Wednesday, 31 August 2011 19:58:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT