Here are some useful hacks that my students and I have been putting together:
The CGI WebServer packages provided by Tim Jones (email@example.com), WebTalk, and by Georg Gollmann (firstname.lastname@example.org) (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.
For Tim's WebTalk -- No longer necessary, but will still work: WTWebServer.st is the WebServer that works with Tim's WebTalk.
For Georg's WebServer: FullWebServer.st is the WebServer that works with Georg's WebServer.
[FullWebServer serveOnPort: 8081 loggingTo: 'log10-1.txt'] fork
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:
CountViewContainer integerCountView. CountViewContainer dateCountView.
Nu-UI.st is very simple: Buttons and Display Boxes only, right now. We haven't yet ported Coad & Nicola's ModelCollectionViewContainer class, so no scrolling lists are available.
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
ChatServer startService. You'll be asked your name, then the window will open: A Connect button, a Send button, and a display box for the chat.
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 email@example.com
"More About Squeak..."
Last modified at 2/10/98; 1:28:01 PM
Home Page for How To Squeak
Other Links of Interest
College of Computing | EduTech Institute | GVU Center
Mark Guzdial | CS2390, Modeling and Design | STABLE
Last modified at 2/10/98; 1:28:01 PM