[OpenAjaxIDE] Unique Identifier for a given widget?

Scott Richards scrichar at adobe.com
Thu Aug 14 14:12:21 PDT 2008


I suggest that it should be the responsibility of the widget author to
ensure uniqueness by namespacing their widgets.  Reverse namespacing is
a good way to ensure uniqueness.  Having an ID allows the name to be
localized without causing any problems.

Here is an example:
<widget
  id="com.yahoo.yui.calendar"
  name"Calendar"
  version="2.5.2"
>

________________________________________
From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On
Behalf Of Kin Blas
Sent: Thursday, August 14, 2008 2:02 PM
To: ide at openajax.org
Subject: [OpenAjaxIDE] Unique Identifier for a given widget?

So someone on our team asked me if there was anything within the widget
metadata spec that could serve as a unique identifier for a widget.

The basic workflow/scenario we have here, is that the widget metadata
file (WMF) could be imported into an IDE which gathers all the assets,
etc that are specified within the WMF, and stores them in some IDE
specific repository such that when the user wants to insert a particular
widget into their document, the IDE can retrieve and insert the relevant
markup/code/asset reference and copy any asset files to where they need
to be so that the document can access them.

The problem we have is that we want to insure that as the user imports
different WMFs that they don't stomp over something that already exists.
I have seen this little blurb from the WMF spec:


"The name attribute specifies the widget name. 20080520 Tentatively
approved: Yes, have 'name'. Name attribute does not have to be globally
unique. Eg, We expect possibility of multiple widgets with name of
'tooltip'. There is implicit namespacing for widgets within a library
because the library has an implicit namespace. OK for tools to
manufacture a namespace from author if needed. Need to say that a name
must match construction for JavaScript identifiers. Remove the
restriction on the name, the name is OPTIONAL and drop the suggestion
regarding using the title attribute if the name attribute is not
specified."


But the fact that @name does not have to be unique and that both @name
and <author> are optional, it really makes it hard on the IDE to figure
out whether or not a given WMF is a totally different widget, or an
updated version of the a widget it has already seen.

Is this something we have to live with? Or is there something that can
be proposed here that can make life for the IDE a bit easier? Perhaps
requiring each WMF that describes a widget have its own ID? Where ID is
generated/registered from some page off of the OAA site? I realize that
such a solution would require infrastructure that the OAA is not willing
to take on, but I'm all ears for any other proposals or ideas.

--== Kin ==--



More information about the IDE mailing list