[OpenAjaxIDE] renewing the discussion of type="library"

Jon Ferraiolo jferrai at us.ibm.com
Fri Jul 18 11:08:34 PDT 2008


Hi Lori,
Maybe our emails cross. Nevertheless, I'll attempt to answer inline below.

Jon


ide-bounces at openajax.org wrote on 07/18/2008 10:35:41 AM:

>
>
> hi gang
>
> I wrote last week, and we discussed briefly at this week's meeting, my
> confusion over how <require type="library"> should work. (
> http://openajax.org/pipermail/ide/2008q3/000539.html ) I have a couple
more
> questions to pose.
>
> 1. We talked a bit about this in last week¹s meeting, but what is the
> expectation for src when type=²library² -- that it would be a single file
> (meaning that all the files in the library would need to be referenced
> individually), or that it would be a folder?

I was assuming a folder. More specifically, the root folder for an Ajax
library.

>   a. If it¹s a folder, then how is that different from type=²folder²?

After thinking about things, I concluded that they are basically the same
in terms of functionality. The high-order bit is that the tool copies a
folder. The one difference is that with type=library, the 'name' refers to
an entry in the OpenAjax Registry.

>   b. Is the idea that "folder" is still relative to an individual widget,
> whereas "library" is a folder or group of files that are shared among
> several widgets, and that would be better placed at a central location in
> the end user's site?

In both cases, 'src' can be an absolute or relative URL. If relative, the
base URL is the metadata file.

But I don't think we have nailed the whole target URL question. Here is a
proposal: There would be a 'target' attribute on both the <widget> element
and the <require> element. The 'target' on <widget> provides a relative URL
(relative to the web page's URL) for where the widget should be installed.
The 'target' on the <require> provides a relative URL (also relative to the
web page's URL) for where the library should be installed.

>
> 2. How will the IDE know the type of the file(s) being referenced with
> type="library"?
>   a. Is the assumption that "library" implies JS?

My thinking is that a "library" represents a bunch of files in a folder.

Usually, you'll need at least 2 <require> elements to deal with a library.
First, a <require type="library"> to copy the distribution. Second, a
<require type="javascript"> to cause a <script> tag to be inserted into the
web page to reference the main JavaScript file for the library.

>   b. What of css files that might be included in a library distribution?
>   c. Is there an expectation that IDEs will attempt to determine the file
> type from the file extension?

Good question. I would say that metadata authors must include a 'type' (and
it must be correct) for the metadata files to be correct but tools may look
at the extension (or even the contents of the file) to make sure that the
files are indeed of the right type or deal with incorrectly-formulated
metadata files.

>
> 3. Is it possible for a widget developer to specify an absolute URL for
> type="library" or type="folder"?

My initial thought was yes, but then you ask the crawling question, and now
I am thinking no. I am now thinking that a widget developer needs to post
any Ajax libraries and folders that they need as part of their widget.
(What do you think?)

>   a. Would the IDE then be responsible for either crawling that folder or
> downloading it?

Crawling seems a bit too much to ask. If the industry standardizes on
posting ZIP files, that's another thing, but I don't think there is such
standardization now.

>   b. See #2.
>
> Thoughts appreciated; we're trying to finalize some code for a beta test
> with a couple widget developers, and the uncertainty around how
> type="library" should be interpreted is blocking us.
>
> Cheers,
> Lori
>
>
>
> _______________________________________________
> 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/20080718/33540b39/attachment.html 


More information about the IDE mailing list