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

On Wed, Aug 31, 2011 at 12:57 PM, Dominic Cooney <dominicc@chromium.org>wrote:

> 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.
>

That is actually a good point.


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.)
>

Wouldn't that be effectively namespaces by another name/mechanism? Also,
there's probably a limit to how far renaming can avoid clashes, e.g., if a
sub-components can also be utilized by a page's author.

In any case, until modules become a reality I think teaching component
authors to use "pseudo-namespaces" (e.g., "x-rogersoft-button" vs.
"x-delilahsoft-button") for stuff that might clash is not unreasonable.


Cheers,

- Roland

Received on Wednesday, 31 August 2011 20:45:13 UTC