Squeakland EToy projects as application delivery

Bert Freudenberg bert at impara.de
Wed Jan 11 11:16:14 UTC 2006

Am 11.01.2006 um 07:27 schrieb goran at krampe.se:

> Hi Eric!
> (replying mainly because you have gone unanswered so far)
> Fournier Eric <emf at umn.edu> wrote:
>> We are interested in using the Squeak web-based project delivery
>> scheme (used by squeakland.org to deliver the EToys projects to
>> Squeak running in a web browser), to deliver more complex
>> "applications" to clients who have installed "generic" images (& VMs
>> and plugins, etc).
> Right.
>> We have teased out some assumptions just by looking at the source of
>> the pages delivered by loading EToys projects (like, for example
>> http://www.squeakland.org/project.jsp?http://www.squeakland.org/
>> fun_projects/proj_pe_mo/wallfollower/cs198-wallfollower-final.003.pr
>> Is there a "How to" doc around that somebody could point me to, or
>> does somebody know how all the bits are wired together?
> Mmmm, my best bet on the persons to ask is Michael Rueger and/or Bert
> Freudenberg, but both are on this list so I guess they will answer in
> due time. :)

I had hoped someone else would explain the basics and I'd step in if  
needed. Which is indeed what happened :)

> Regarding how to do it - well, I haven't actually used it myself but
> AFAIK it is pretty straight forward. First you of course need the  
> plugin
> for your browser installed. Then the image can be whichever image you
> like. The code in the image that performs the actual load is (I am
> pretty sure) the code in:
> 	ProjectLauncher>>startUpAfterLogin
> ...well, it actually starts in:
> 	ProjectLauncher>>startUp


It's up to you if you want to use that mechanism or something else.  
Basically, the browser plugin retrieves the file named as SRC in the  
HTML tag, and passes the filename as parameter to the VM:

	Smalltalk getSystemAttribute: 2

(the same mechanism as used when running your image from the command  
line with a script as parameter)

Additionally, the browser passes all the parameters in the HTML tag  
as system attributes starting at 3 (see #extractParameters).

 From there you can take it whereever you want. The src file might be  
a script that you execute, or a project that you install, or  
whatever. If you want to get more fancy you can download more files,  
there are a few primitives to directly talk to the browser plugin  
(HTTPClient is a facade for that).

> And the web page is AFAIK just "as it looks". Not sure why Squeakland
> uses .jsp.

Well it at least inserts the SRC parameter (the squeaklet URL) in the  
HTML source, plus a few more like highest available update number  
etc. This used to be implemented as a JSP served by Tomcat. Also, the  
HTML was (is?) specialized based on the browser. You wouldn't believe  
how many different templates there had to be. Or maybe you would ;-)

Nowadays it's not actually Java-based anymore, but we'd break a huge  
amount of links if we renamed that entry point.

- Bert -

More information about the Squeak-dev mailing list