[Seaside] Jetsam

Keith Hodges keith_hodges at yahoo.co.uk
Thu Jul 19 20:06:29 UTC 2007

Dear David,

Jetsam is now open!

I have begun by committing some initial bits and pieces I found lying 
around on the beach.
I have a few other ideas to add as and when, for example hooks into a 
basic logging add on.

When you contribute to Jetsam please add to the list of 
extensions/features in the JetsamSeasidePackageInfo-readmeText method, 
and I think that it would be a useful convention to indicate which 
version number  of seaside2.8 is the current latest to which this 
package corresponds.




ext 01: WAConfiguration-hasPreferenceGroup;
ext 02: WACachedDocument-clear to ensure next access the document is 
re-read from disk.
ext 03: WATagBrush-idNotNil: convenience method for setting ids.
ext 04: WAImageTag-fileName: restore old api, so that it can be used 
even though deprecated.
ext 05: WAHtmlCanvas-heading:level: restore old api, so that it can be 
used even though deprecated.
ext 06: WASession-download: contents mimeType: mimeType filename: fileName
        Enables an anchor to respond with the file content to be downloaded.
ext 07: WADocumentHandler-mimeDocument/response
       Enables documentClasses to signal respond with doNotCache by 
implementing #notCached
ext 08: WABatchedList-totalSize accessor
ext 09: WANotCachedDocument - document that doesn't want to be cached in 
ext 10: WALibrary names and hence urls are not tied to the class name,  
#libraryName can be specified.
ext 11: WAFileHandler-responseAt:ifAbsent:/libraryAt:ifAbsent:
        This resolution process enables the libarary resolved by the url 
to decide who serves the document.
        (the default behaviour is hardwired such that that library class 
itself has to serve the content).
ext 12: WAStandardFilesPlus and WAStandardFilesPlusTest
        - see class comment for details.
        - override seaside defaults in your project, and also serve from 
DISK if you wish.

WAStandardFilesPlus class comment:

The majority of seaside projects need to have WAStandardFiles included 
otherwise such things as the toolbar cease to display properly.

This class inherits from WAStandardFiles and so by subclassing me, and 
adding your subclass to your project (e.g. MyFiles)
you can override the defaults. I also add some features.

Note the following example, in which the filename may be used to 
reference a file in your generation code.

html image url: (MyFiles / 'logo.gif').

In standard seaside the file selector form #logoGif would be used. In a 
shameless hack which would never be accepted in seaside proper, we 
enable both forms. A symbol is assumed to be a selector reference, and a 
string is assumed to be a file reference. We do this simply because, in 
situations where you may be asking a user to specify a file via a 
settings interface, they are likely to be more familiar with the 
filename form. The filename form is also cannonical.

Your subclass can also specify whether or not it caches DISK (i.e. not 
those stored in a file library method selector aka WAStandardFiles) 
based documents, by defining #documentClass. By default we serve 
non-cached documents (i.e. we do not cache the document, and we request 
that the browser does not either), but once your project is defined you 
may wish to change that.

We keep a cache the fileNames of those files we have available to serve 
from disk.

More information about the Seaside mailing list