Widgets and Books for Squeak
swan at dandenong.cs.umass.edu
Wed Mar 22 21:06:38 UTC 2000
On Wed, 22 Mar 2000 John_Gardner at dmr.ca wrote:
> My question to anyone is: are there any Smalltalk books in print, which come
> close to the Squeak implementation, other than the original ST80 books?
It varies. I recently purchased The Art and Science of Smalltalk by Lewis
and Smalltalk With Style by Klimas. Smalltalk With Style is a style guide
and is completely applicable to all flavors of Smalltalk, including
Squeak. The Art and Science of Smalltalk was almost Squeak compatible - 95
- 98% of the code examples ran fine and used classes in Squeak. The
examples that didn't run as is weren't too hard to fix either - it was
pretty easy to figure out what the name of the class had changed to. (I
think Art & Science is based on VW, but I don't remember). I also
purchased Discovering Smalltalk by Wilf Lalonde, but it turned out to be
too basic for me. However, I think the great majority of that works fine
in Squeak too.
OTOH, I have an old copy of Practical Smalltalk by Dan Schafer (out of
print). It's written for Smalltalk V/286 and most of the examples don't
work in Squeak.
The question is, how much GUI specific code is there? Practical Smalltalk
did a lot of GUI code, and the GUI programming is what is most different
about Squeak. Get a good general Smalltalk book (I like Art & Science of
Smalltalk a lot, and a lot of other books are recommended on the Swiki)
and read Jim Benson's tutorials on Morphic.
> 2. Widgets
> Everything today seems to be focused upon Morphic. While it has many features,
> which make Java look sick, it is big and slow compared to MVC.
> In the Java world, you have two options, use AWT or Swing. AWT is analogous to
> MVC, while Swing is somewhat analogous to Morphic. If you are writing applets,
> it is recommended that you use AWT for speed and compactness.
Your analogy is OK, but you draw it too far. Your analogy is Morphic is to
MVC as Swing is to AWT, and Swing doesn't work too well (AWT is a better
choice), therefore MVC is a better choice than Morphic. I don't agree.
Morphic may be large and slow compared to MVC, but I think in performance
it is at least as fast as AWT. Part of the problem with Swing is how buggy
it is, and I haven't found bugs to be a problem in Morphic.
Morphic isn't usable on handhelds, but you're talking about using widgets
from a library. GUIs that work on desktops don't work on handhelds, so if
you're talking about Squeak for building widget rich GUI apps they
probably won't be appropriate for handhelds anyway.
There are some problems in Morphic - it is very large and confusing. Jim
Benson's tutorial helped me a lot with that, and I guess there will be
better documentation about fundamental Morphic coming out. Another problem
is morph locking is not complete - you can take Tetris and bring up a halo
on the controls and remove the controls. You don't want the user doing
that on a running app. There are some methods in place for that
(configureForKids), but more work needs to be done.
> Similarly, wouldn't it be a good idea to have a core set of widgets developed
> for MVC, when speed and compactness are needed? A lot of OS system functions
> could be developed using Squeak and MVC-Widgets, instead of using
> IMO, there is a need to have a small, fast, core implementation of Squeak, using
> MVC-Widgets. Perhaps a combination of the embedded Squeak and MVC-Widgets as a
> core package, which is then built-up, as required, to include Morphic, Fabrik,
> Alice and Wonderland.
> Does anyone else think this approach has merit?
I think adding the required functionality to Morphic is a better approach
than building a full set of widgets in MVC. Otherwise I agree with you -
I'd like to see a small basic image with other parts that can be loaded as
More information about the Squeak-dev