a Squeak web browser

Lex Spoon lex at cc.gatech.edu
Sat Jul 25 13:07:26 UTC 1998

Hi Squeakers, 

I've been working on putting together a Squeak web browser, and it's
to the point now that you really can use it--it can handle links,
lists, headers, and basic forms--enough to browse text-oriented pages
and to do basic searches on Yahoo et al.  Below is a little more
detail as posted on our Swiki; I'm not sure what more to ramble about
so will just leave it at that.  Comments and ideas welcome!


=================  http://minnow.cc.gatech.edu/squeak.14  ===========

Scamper is a simple web browser which runs in Squeak. Currently it
supports: titles, headers, paragraphs, emphasis, links, lists, some
forms, most text emphases--the basics. Some things that don't work
are: tables, frames, cookies, auto-reloading.

Why use a Squeak browser instead of Netscape? Because of all that
working in Squeak implies. The code and the objects are all there,
accessible if you ever need to gt at them. A Squeak user in this
system isn't limitted to just looking at rendered HTML pages, but can
get directly at the underlying objects which structure them; they can
move within the web, instead of just looking at it through glass.

At least, that's the idea.

The code is at http://www.cc.gatech.edu/~lex/squeak/www0.2/. It is
under constant change still. The system is divided into the following
main changesets: 

	o Misc-URL - parsing absolute and relative URLs, and
	downloading Web documents through an abstract
	interface. Also includes a "MIMEObject" class which combines
	data with its content-type.

	o HTML - The biggest part. It includes three main subparts:

		1. HtmlTokenizer - divides a text stream into a
	        sequence of HTML tags, text (handling character
	        reference entities) and comments.

		2. HtmlParser - takes the results from the above and
		generates a tree of HTML entities which is more
		convenient to manipulate.

		3. HtmlFormatter - takes the result of the above and
		generates a formatted Text object suitable for
		displaying.  o Scamper - a simple Web browser. It
		currently only works in Morphic, but it wouldbe
		easy to have a display-only version in MVC. I don't
		see how to make forms work in MVC, though; not with
		near the ease as it can be done in Morphic. Ideas
		are welcome, though!

The following supporting changesets are also needed: 

	o protocolHacks - supports form requests over HTTP, plus some
	other small changes

	o governedPolling - slows the UI loop in Morphic (well, MVC,
	too). This is critical for the way Scamper is written, where
	pages are downloaded and rendered in a low-priority background
	thread. Without this, the background thread never executes.

	o DirectoryEntry - makes the directory entries returned by
	FileDirectories have their own class, instead of just being
	5-element arrays.

Mild Warning

Some of the above code makes minor system changes to make things
work. Well, at least I hope they're minor. Point is: don't use this in
an image holding data you don't have backups of.


Dumb dee dooo......


Scamper was originally put together by Lex Spoon.

David Pennell has been working on the HTML representation, and pointed
out the existing Document Object Model described above. (feel free to
jump in and explain this better!)


Hey, this is a Swiki after all. Any comments are quite welcome.

More information about the Squeak-dev mailing list