[ANN] *Proper* Squeak Server Pages, Directory Listings, Comanche

Brent Pinkney brent_pinkney at yahoo.co.uk
Thu Nov 28 10:59:29 UTC 2002


Good People,

I have had a stab at providing Comanche proper Squeak
Server Page support (ie. embbedded <% ... %> tags in a
text file).

I have borrowed gratuitiously from STT and the
existing SSP stuff. 

I shamelessly use the SSP term becuase I need it for
my prototyping - it is nice and similar to
ASP,JSP,PHP. 

Features:
1. Arbitrary Smalltalk code is embedded in <% ... %>
tags.
2. The #printString result of some embedded code can
be embedded in <%=  ... %> tags.
3. Other files can be included using the <%include:
filename %> tag.
4. Local variables can be decalred and refernced by
subsequent tags. See issues.
5. Psuedo variable self is the Comanche HttpRequest
and can be referenced.

Examples...
1. <html> Collecting garbage.. <% Smalltalk garbage
collect. %> <br> done. </html>

2. <html> <h1> The time is: <%= Time now %> </html>

3. <html> <%include 'banner.ssp' %> </html>

4. <html> <% f _ [ :n | n factorial ] %> 5 Factorial
is: <h4> <%= f value: 5 %> </h4> </html>

4. <html> URL is <h4> <%= self url %> </h4> </html>

Changes are made to Squeak3.2-4956 and Comanche 4.10.

It is implemented as a Comanche module
DynamicFileModule which extends the exising
StaticFileModule.

Also included is a Comanche module
DirectoryListingModule which returns an HTML
representation of a directory.

Some minor changes were made to Comanche 4.10 to make
is aesthetic. Introduce DirectoryEntry>>#description.

The relevent class descriptions have been documented.

See ChieftainModule class>>#basicExample for how to
configure such a web server.

Cheers

Brent




__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KomDynamicFileModule.cs
Type: application/octet-stream
Size: 16751 bytes
Desc: KomDynamicFileModule.cs
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20021128/e25e7103/KomDynamicFileModule.obj


More information about the Squeak-dev mailing list