[OpenAjaxIDE] an odd object case

Lori Hylan-Cho lori at avocado8.com
Mon Jul 20 18:47:07 PDT 2009

On Mon, Jul 20, 2009 at 8:41 PM, Jon Ferraiolo <jferrai at us.ibm.com> wrote:

> My best suggestion is to leverage the 'format' attribute. The 'datatype'
> attribute is meant to describe the raw JavaScript datatype, which in this
> case would be Object. The 'format' attribute provides supplemental semantic
> metadata. But now comes the question about whether this particular case is a
> common industry case or whether this is a one-off scenario. Three
> possibilities:
> (1) If this is a standard case across the industry (e.g., JSON hash table?
> ImageList?) and can be described completely so that we make the industry
> more interoperable, then we might consider sneaking in a new built-in value
> for the 'format' attribute (along side of format="id", "class", "email",
> etc.). Perhaps format="JSONHash".
> (2) On the other extreme, if this sort of JSON structure represents a
> one-off scenario for a single toolkit (e.g., FooToolkit), then we should
> consider leveraging the extensibility feature in the 'format' attribute
> where the value is a URL. Perhaps format="
> http://adobe.com/dreamweaver/formats/FooToolKit/JSONHash".
> (3) In the middle, if we decide it isn't appropriate to define a new
> built-in value for 'format', but this is a common feature across multiple
> toolkits, then we could leverage the extensibility feature in the 'format'
> attribute using a URL value, but define a OpenAjax.org URL for this, such as
> format="http://openajax.org/metadata/formats/JSONHash". This approach
> would provide a "standard extension".
> Jon

I'm not opposed to creating a JSONHash format, but I'm not sure it sheds any
more light on the properties of the elements inside the hash. How would we
represent this information in the metadata? Or is it implicit in your
suggestion that where the format is JSONHash, a <label> (or some other
similar) tag, with datatype and format attributes, could also be a valid
child of <property> and <parameter> tags? For example:

<property name="data" datatype="[String]|Object" format="url|JSONHash">
  <label datatype="String" format="url">
    <property name="caption" datatype="String" />
    <property name="href" datatype="String" format="url" />
    <property name="thumbnail" datatype="String" format="url" />

I originally typed the above with the <label> and child <property> tags
being empty siblings, but that didn't feel right, as it made it sound like
caption, href, and thumbnail were properties of data, when they're really
properties of the objects in the hash.
Does the way I have it now make sense? Most importantly, Kin, does it
solve your implementation issues?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20090720/82a0264e/attachment-0001.html 

More information about the IDE mailing list