seaside
Seaside development with GNU Smalltalk
The next release of GNU Smalltalk will include support for Seaside. This blog post is a short tutorial, which will show how to make your first Seaside component.
To follow this tutorial you need GNU Smalltalk 3.0a (which will be available from ftp://alpha.gnu.org/gnu/smalltalk/smalltalk-3.0a.tar.gz later today) or a later version.
One of the new features in 3.0a and later is the ability to run an image in the background and control it from the shell. For example, you can try these commands:
$ gst-remote --daemon $ gst-remote --eval '100 factorial' $ gst-remote --kill
Swazoo runs on GST!
That's it! Swazoo runs on GNU Smalltalk! Code is not yet committed, but it works and passes the entire testsuite.
This script for example will start a web server on http://localhost:8888/
PackageLoader fileInPackage: 'Swazoo'.
Swazoo.Resource subclass: MyResource [
answerTo: aRequest [
| response |
response := Swazoo.HTTPResponse ok.
response entity: '<h1>Hello World!</h1>'.
^response
]
]
site := Swazoo.Site new name: 'test'. "name is just for convenience"
site host: 'localhost' ip: '127.0.0.1' port: 8888.