How to improve Squeak

Russell Penney russell.penney at tincanct.com
Mon Jul 12 00:42:54 UTC 2004


Stephane,
	Sorry for the loss of the accent in your name, I can't find the
right character! :)

I agree wholeheartedly, I keep running across bits and pieces that do not
work. It must be very hard for people new to Squeak and/or Smalltalk to
makes sense of the multitude of class especially when lots of stuff doesn't
work OR doesn't work correctly!! I know I have been bitten a lot.

I am proposing parallel way of tiding things up a bit:

Resources (Codec is another (maybe better) term for the classes I will
describe in a sec)

A "resource" is some object encoded on a data source external to Squeak.
MP3, OGG, JPEG, MPEG, PNG, Hypertext, Rich text, Word documents, Illustrator
files, etc, etc ,etc.

The problem I see is that getting access to a "resource" is easy for some
types and not so easy for others. Most types have different interfaces.
ImageReadWriter is great but doesn't go far enough. Also types are usually
setup to read streams but again, sometimes, in an inconsistent manner. Which
can make code that writes a JPEG to a file, unable to write that JPEG to a
HTTP socket. Yes I know there is a way to do most things in the existing
classes BUT there is no common way.

As an application developer (say a new game or top level application) I want
to be able to reference some address and get a Form returned simply and
easily. Same for any sounds I want, or video, or my instructions page. I
don't want to have to learn a bunch of other classes (which have lots of
unfinished code in them) just to be able to return my resource object (lazy
aren't I). I don't care that my object is a JPEG file on a hard disk, I just
want it!!!!! :)

If I am writing a tool, I don't want to write an interface for files, HTTP,
FTP, etc. I want to write one interface for resources no matter where they
are.

This is so much re-inventing of interfaces to resources in current Squeak.
Having a good set of base interfaces would go a long way to cleaning up some
of the code.

I have made a start at http://minnow.cc.gatech.edu/squeak/415. I have a lot
more to document but this is a start to stimulate discussion.

I am willing to guide/drive this process and to write most/some of the code.
:) In fact I have made a start and am getting ready for another assault.

Oh and please note I am not suggesting we replace Stream classes, just
basically adding a high level layer over the top so people who don't care
about the implementation don't get bogged down in it.

Russell






More information about the Squeak-dev mailing list