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

On Thu, Aug 25, 2011 at 9:12 AM, Adam Barth <w3c@adambarth.com> wrote:

> On the other hand, it seems likely that some of these xdash names will
> come into multi-party use.  For example, the following use cases
> involve xdash names chosen by one party and then used by another:
>
> http://wiki.whatwg.org/wiki/Component_Model_Use_Cases#Widget_Mix-and-Match
> http://wiki.whatwg.org/wiki/Component_Model_Use_Cases#Contacts_Widget
> http://wiki.whatwg.org/wiki/Component_Model_Use_Cases#Like.2F.2B1_Button
>

Since the components that are used on a page are under the control of the
page's author, it should be possible to avoid clashes by separating a
component's definition (potentially pulled from third party) from its tag
registration (done by page author), e.g.

// Importing component definition for Facebook "Like" button
// Importing component definition for Google+ "+1" button
// ... later:
Element.register("x-fb", Facebook.LikeButton)
Element.register("x-gg", GooglePlus.PlusOneButton)

That's something like 40% of the use cases...
>
> I don't have much of a better suggestion.  You're running up against
> all the usual distributed extensibility issues.
>

We could use namespaces... *ducks and runs* :D


Cheers,

- Roland

Received on Friday, 26 August 2011 08:08:38 UTC