[OpenAjaxIDE] <require> type attribute values ...

Jon Ferraiolo jferrai at us.ibm.com
Fri Sep 12 15:46:39 PDT 2008


Hi Howard,
I think Kin and I have been saying the same thing. The <requires> and
<require> elements serve two purposes:

(1) List those assets (folders and files) that need to be copied into the
deployment area so that the widget will work correctly.
(2) List those assets that need to be listed in the HEAD of the generated
HTML document. (This is for CSS files and JavaScript files.)

(I think the above matches what you say below.)

As I remember, the reason we added 'image' to the list of types is solely
to tell the tool that a particular file (in this case, a raster image file)
needs to be copied into the deployment area. This is pretty much the same
as what happens if type="folder", but with 'image' we are copying a single
file instead of a directory. I don't expect that 'image' (or 'media' or
'other') will be used very often because most of the time the image files
(and video files) will be inside of a folder that gets copied into the
deployment area, but it will be used sometimes. In fact, we added 'image'
because Adobe found situations where they wanted to copy a particular file
and not a whole folder.

I am assuming that Kin is asking that we offer 'other' to cover single
files that aren't raster images. I think that's fine, but the one
modification that I propose is to have another keyword of 'media' to
provide better semantic value within the markup (but same function as
'image' and 'other'). I'm also OK with dropping 'image', 'video' and
'other' and just having 'file' (i.e., any type of file, no matter whether
it is an image, a movie, or anything else).

Jon





Hi.

Much of what we are doing in widget.xml is about defining
the "interface" contract between the widget and its environment (though
there are exceptions). Your question is valid; we should specify whether
<requires> is part of that contract or whether it is some kind of manifest
of a widget's internal implementation assets.

I see <requires> as defining a portion of the contract between.
This contract is not concerned with the contents of the widget;
it is a declaration that specifies what the environment must provide
in order for the widget to function when embedded in that environment.

As such, <requires> does not list every one of the widget's internal
HTML, JavaScript, XML or image files (particularly as some of these may
be dynamically generated at run-time or retrieved from servers
based on dynamic URLs). Rather, <requires> only lists the files that
the external canvas/environment must provide so that the widget will
work properly.

So why do we include images in <requires>? As I understand it,
a widget's <require> should ONLY list images that are defined externally to
the widget. For example, suppose that a family of widgets is "skinnable."
All widgets in the family depend on an external "skin" asset associated
with the context in which the widgets are embedded (the site, page, IDE, or
whatever. The "skin" must provide an image (user.png) that represents a
user. The image is not baked into any of the widgets; rather, all of the
widgets need the environment / canvas to provide the image. Most of the
time the "skin" is probably defined as a folder, but sometimes we may want
to be more specific.

In general, I don't see flash movies and the like being required for this
purpose.
Maybe sounds... .

Does everyone else see <requires> as a contract specification?

Best Regards,
Howard

 From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On Behalf
 Of Kin Blas
 Sent: Friday, September 12, 2008 12:20 PM
 To: ide at openajax.org
 Subject: Re: [OpenAjaxIDE] <require> type attribute values ....

 We can’t assume that it will be loaded by a JS dependency or a library.

 My understanding of <require> is that it does a couple of things:

       -          It lists the assets that the widget depends on.
       -          It gives a hint to the IDE what references need to be
       included in the <head> of the document.

 Some IDEs such as Dreamweaver depend on the assets list to figure out what
 files and directories need to be copied to a user’s site. Now these media
 files could be in a directory that is referenced by a <require> file, but
 I don’t think we should be assuming that *every* widgets assets will be
 organized that way.

 --== Kin ==--


 From: Howard Weingram [mailto:weingram at tibco.com]
 Sent: Friday, September 12, 2008 11:48 AM
 To: Kin Blas; ide at openajax.org
 Subject:; RE: [OpenAjaxIDE] <require> type attribute values ...

 The <require> deals with incorporating the portlet's..
 dependencies into the canvas outside of the widget's..
 own "space". Wouldn't the multimedia files that you
 are talking about exist as part of the widget itself, or
 else be loaded by a JavaScript dependency or a library?

 Best Regards,
 Howard


 From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On Behalf
 Of Kin Blas
 Sent: Friday, September 12, 2008 11:20 AM
 To: ide at openajax.org
 Subject: [OpenAjaxIDE] <require> type attribute values ...
 The spec currently enumerates these values for the @type attribute of the
 <require> tag:

 library | javascript | image | css | folder

 I think we need to either add some other types, or introduce the notion of
 an “other” value to accommodate other popular file formats such
 as .mov, .avi, mp3, .swf, .flv, etc?

 Thoughts?

 --== Kin ==--

  _______________________________________________
 IDE mailing list
 IDE at openajax.org
 http://openajax.org/mailman/listinfo/ide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20080912/b10632be/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20080912/b10632be/attachment.gif 


More information about the IDE mailing list