Downloads

Here are some useful hacks that my students and I have been putting together:


WebServer

The CGI WebServer packages provided by Tim Jones (tim@thregecy.com), WebTalk, and by Georg Gollmann (gollmann@edvz.tuwien.ac.at) (at http://ftp.tuwien.ac.at/~go/Squeak/webServer.html) are really great (available at the "Create" site), but they focus on serving CGI scripts from inside of Squeak. I also wanted to serve HTML, GIF, and JPEG files. The downloads below provide subclasses which add file access capabilities to these tools. Thanks to the efforts of John Maloney, Tim, and Georg, these have become quite stable on the various Macs I've tried them on (e.g., longest run without problems has been about four days, before I had to restart the machine for other reasons), using both 1.20 and 1.22 versions of Squeak and respective versions of WebTalk and WebServer.

Caveats!

For Tim's WebTalk -- No longer necessary, but will still work: WTWebServer.st is the WebServer that works with Tim's WebTalk.

  • You will need to modify the WTWebServerclass method startServer to set the ServerDirectory (where HTML etc. files live.)
  • You also set the port for your WebServer to watch in startServer. Port 80 is the standard for Webservers -- that's where Navigator, Explorer, etc. will reference by default. You can set another (e.g., I often test on 8080), and reference it as http://yourserver:8080/yourfile.html
  • Start it with WTWebServer startServer
  • Stop it with WTWebServer stopService

    For Georg's WebServer: FullWebServer.st is the WebServer that works with Georg's WebServer.

  • You will need to modify the instance method getReply in FullWebServer to set the serverDirectory.
  • You set the port at the startup. I like my WebServer to run in the background (e.g., letting me continue to work in Squeak while it's serving), so I use a fork command to get it started. [FullWebServer serveOnPort: 8081 loggingTo: 'log10-1.txt'] fork
  • Stop it with FullWebServer stopServer.


    UI Support for Coad and Nicola

    In the Sophomore classes I teach at Georgia Tech (see http://www.cc.gatech.edu/classes/cs2390_97_summer/ for a recent course), we use the text Object-Oriented Programming by Peter Coad and Jill Nicola (Prentice Hall: 1993, ISBN 0-13-032616-X). It introduces object-oriented analysis, design, and programming, using both Smalltalk (VisualWorks) and C++ -- which is exactly what the course is supposed to be about.

    In the Winter 1998 term, we are planning to move to Squeak, and at first (at least), we'd like to continue to use Coad & Nicola:


    Simulations Package

    In the same course, we do simulations using the set of classes in Adele Goldberg and David Robson's Smalltalk-80: The Language ("The Purple Book" -- originally, "The Blue Book" Smalltalk-80: The Language and Its Implementation). A long time ago, we got it running in VisualWorks, and it was easy to move to Squeak. (Actually, this is one of the few cases where "The Purple Book" isn't exactly the same as Squeak. File manipulation is different in Squeak.)

    The Simulation Package is in SimulationsPkg.2Oct.cs. There are demo class methods in several of the provided example simulations: Museum, CarDealer, and DoNothing. Course notes on the simulation package are at http://www.cc.gatech.edu/classes/cs2390_97_summer/lectures/IntroSims.html and http://www.cc.gatech.edu/classes/cs2390_97_summer/lectures/moresims.html. There are several more complex examples of simulations built on this package in STABLE.


    Rudimentary Chat Window

    I've built a very simple Chat window in Squeak, using Tim's WebTalk. You will need Squeak-UI.st, ChatServer.st, and ChatView.st. (I used our simple UI class to build the Chat Window.) I haven't tried this yet with Nu-UI.st

    Bugs: The ChatServer itself seems to be working. I've been chatting between two Macs using WebTalk with no problem. The UI, however, gags. DisplayTextView is the class we're subclassing to create our display boxes, and it seems to be doing strange things. New text is initially slammed onto the screen at 0@0, and only appears in the window if you refresh the display or move the Chat Window (to force it to redraw). And if you chat too much, the text just moves on down past the end of the window.

    I plan to try building a Chat Window that doesn't rely on Squeak-UI.st, and builds on StringHolderView instead, but I haven't got to it yet. This is superseded by Nu-UI.st which does build on StringHolderView


    If you have any problems or suggestions, or even want to let me know that you're using these (much appreciated!), please drop me a note at guzdial@cc.gatech.edu


    "More About Squeak..."
    Home Page for How To Squeak

    Last modified at 2/10/98; 1:28:01 PM
    Other Links of Interest
    College of Computing | EduTech Institute | GVU Center
    Mark Guzdial | CS2390, Modeling and Design | STABLE