Squeaklets

Stephen Pair spair at advantive.com
Sat Jul 3 03:14:40 UTC 1999


Over the last couple of days, I've played around with enabling "Squeaklets."
What I've done is create a Squeaklet host image that will interpret an HTTP
url passed to Squeak on the command line as the address of a Squeaklet file.
The Squeaklet file is a modified image segment file that constains
"resolvers" for out pointers.  Currently, this is nothing more that an array
of compilable strings that will resolve out pointers to something contained
withing the Squeaklet host image (and terminated only with a Character cr)
The innefficiency of the compilable strings and the carriage return denoting
the boundary between out pointer resolvers and the actual image segment will
have to be corrected...but this is just experimentation.

I've doctored up ImageSegment a little bit to handle a Squeaklet file.
Also, I've created an Applet class that you can send #saveApplet to, and it
will take you through a series of steps that allows you to either expand the
scope of your applet (by adding to the rootArray), or store a resolver
string to resolve an out pointer.

I thought I'd go ahead and put a demonstration of this out.  Mainly, I'd
like to find out if anyone else is exploring this area.  The big areas left
to be addressed are Squeaklet dependencies (allowing one Squeaklet to depend
on another), Squeaklet host image versioning, and cutting the contents of
the Squeaklet host image down to something small, but acceptable to
everyone.  I'd propose that the Squeaklet host image contain the minimum
requirements for Morphic, no MVC, networking, multimedia capabilities, the
basic Morphic widgets, and of course the base Smalltalk-80
classes...everything else (including things like the class browser,
debugger, inspectors and other dev tools) could be provided in their own
image segments.  This host image should be made to live within any web
browsers on any platform.

I imagine other people have done some similar things, but it's something I'm
very interested in and would like to hear opinions.

To get the demo applet host image, download
http://www.advantive.com/squeak/applet.image (it's just under 5 meg...no
need for sources or changes files).

And then start it from a shell (command line) with: "squeak applet.image
http://www.advantive.com/SameGameApplet.seg"...this image has only been
tested on a 2.4 VM.

That should start the applet host image, and immediately try to download the
applet segment file from the abover URL.  The applet just opens a SameGame
morph (admittedly, it's not very exciting), but the morph is actually
contained within the applet.  The applet is about 33K in size.  Keep in
mind, the code in that image is very rough.

- Stephen





More information about the Squeak-dev mailing list