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

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 UTC