W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1996

Advice on Extending Jigsaw?

From: Anselm Baird-Smith <abaird@w3.org>
Date: Wed, 7 Aug 1996 18:34:12 +0500
Message-Id: <9608072234.AA25025@www18.w3.org>
To: Dave Makower <davemak@pencom.com>
Cc: www-jigsaw@w3.org, leon@pencom.com
Dave Makower writes:
 > Dr. Baird-Smith, et. al.:
 > I'm working on an extension to Jigsaw that would allow a hierarchy of
 > information to be accessed from the server.  In the model we are using,
 > some resources are collection resources, and others are terminal or "leaf"
 > resources.  Similar to a directory/file structure, except that the leaf
 > objects are not necessarily physical entities, but rather may be
 > generated/synthesized on the fly from metadata.
 > Right now, I'm in the early stages of testing our idea, and I've designed
 > two classes, both of which inherit from FilteredResource.  Much like
 > DirectoryResource, my TestContainer class makes use of a
 > SimpleResourceStore to keep track of its children.  (I have, in fact, used
 > the DirectoryResource code as a model in constructing my TestContainer
 > class.  Note that TestContainer does _not_, however, inherit from
 > DirectoryResource.)
 > In order to test these classes, I've placed them in the appropriate
 > locations in the Jigsaw hierarchy, and found that clicking the
 > "AddingResources" link will not allow me to add an instance of my
 > TestContainer resource to the server's information space.
 > Am I right in concluding that I need to develop my own Editor and
 > AddHandler classes (like DirectoriesEditor and DirectoriesAddHandler)?  I
 > could use a word or two of advice as to the best way to go about this, as I
 > can't find a whole lot of documentation on this part of the Jigsaw API.

You need to construct your own editor class, and register it to the
FormEditorFactory. The best documentation ;-) is to look at the
DirectoryResourceEditor in w3c.jigsaw.formedit, but unless you have
serious reasons for doing so, I would recommend sub-classing the
directory resource (which looks possible from what you says...)

As a bonus, if you sub-class the DirectoryResource, you put yourself
behind an extra layer of abstraction, which will prevent you the
burden of upgrading yor classes when next release of Jigsaw comes out
(although we have taken a lot of care to minimize these changes,
things like lookup have changed).

Received on Wednesday, 7 August 1996 18:34:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:29 UTC