11/06/2006

Smalltalk, Direct Manipulation and End User Programming

This article is about historic perspective on the original objectives of the Smalltalk and Squeak projects. It reflects my current understanding on these issues, and I'll gladly welcome corrections and materials for further study.

The original purpose of the Smalltalk project in Xerox PARC was to make computing power accessible to anyone, especially kids. But it took a very long time to happen. Only about 25 years after the project start, the Etoys system is ready and used by kids at school. In the meantime, other ideas and technologies were developed to support that long-term goal. They made their way into the professional programmers' world. Some of them are: object oriented programming, the Smalltalk language and environment, overlapping windows and context menus and direct manipulation guis. Let’s see some milestones in this road.

Model View Controller

MVC (by Trygve Reenskaug) was the framework for the Smalltalk-80 user interface. It was written in the Smalltalk language and it was meant to be used (programmed) by programmers. The way to design user interfaces using it was by writing code to describe the behavior of objects. The gui is built with objects that the user can manipulate in a limited way, i.e. the user can move a scrollbar, but can not modify its behavior without going to a browser to write the code.

Jecel Assumpção Jr. writes “The only thing I would add about MVC is that it makes good use of the fact that humans have a single locus of attention (chapter 2 of Jef Raskin's "The Humane Interface" goes into detail about this). So there is one active object on the screen while all the others are frozen. Using the pointer position as a proxy for the locus, the Controllers collaborate to quickly switch which one of them is active. In a similar way, only the top View can be updated but as soon as the user is interested in a different View it comes to the top and is refreshed. I consider this to be the visual equivalent of the "block variables are really method temporaries" hack in that most people don't notice any problems. Bill Atkinson from Apple was so convinced he had seen partially obscured windows being updated in the famous PARC Smalltalk-80 demo that he worked long and hard to come up with a way to reproduce this for the Lisa and Mac (what he called "region algebra").”

Alternate Reality Kit

ARK (by Randy Smith) was the first attempt at a direct manipulation user interface. The idea is that every object in the system has a physical representation on the screen, and each object's behavior can be changed by interacting with it. Even though it was implemented in Smalltalk-80 (a class based language with browsers for writing code), it goes on the path to assembly of objects instead of programming, and thinking on instances rather than classes. ARK also had something that none of the later systems had: the possibility of handling physical laws, like inertial movement, forces, and gravity. Watch the ARK video at http://www.open-video.org/details.php?videoid=8050 .

Self - Morphic 1.0

The Self system (by Randy Smith, John Maloney and others) is the crystallization of many of the ideas in ARK. It is completely instance-based. There are no classes. It is completely based on object assembly. There are no browsers. The direct-manipulation gui is the only gui. All the definition of the behavior of objects (what we usually call "programming") is done by direct manipulation. Therefore it is the most pure implementation of these ideas. However, programming in the Self environment is not easy enough to consider it an end-user programming system. Watch the Self video at http://video.google.com/videoplay?docid=5776880551404953752 .

Squeak - Morphic 2.0

Morphic 2.0 (by John Maloney) is a Smalltalk framework for user interface based on Morphic 1.0. It allows direct manipulation and assembly of graphical objects (Morphs) but not of other objects. It requires Smalltalk programming of the Morphs. Programming is therefore done by defining classes in browsers. It is therefore incomplete when compared with the ideas explored in ARK and implemented in Self. The main motivation for this work was to support the “User Scripting programming style”, later known as Etoys.

Squeak - Morphic 2.0 - Etoys

Etoys (by Squeak Central) is an end-user programming system that implements the programming model of Self but is written on top on Morphic 2.0. The idea is to make programming easy enough for non-programmers, especially kids. We have two environments: The Etoys environment, a Self like system based on instances with direct manipulation assembly of objects. And below that we have the Squeak - Morphic 2.0 environment, based on classes and programming with browsers.

Tweak

Tweak (by the Croquet team) is a newer gui framework built to support a newer Etoys like system for the Croquet project. It doesn't rely on Morphic, but inherits many ideas from Morphic2 and Etoys. The end-user and the low level programming languages are a bit closer, although the first is still instance based, and the second is class based.

MorphicWrappers

The story is not linear, and there were other evolutionary paths for these ideas. The goal of the MorphicWrappers project (by Luciano Notarfrancesco and Gerardo Richarte) is to complete Morphic 2 to make every object in the Smalltalk system have a physical representation. Therefore it can be seen as a modern implementation of ARK. It is not oriented at end-user programming.

Scratch

Scratch (by John Maloney and others) is a media authoring tool similar in some aspects to Etoys. It is built with Squeak, and most likely, using Morphic 2. But it is a closed tool, in the sense that there is no way to access the underlying system.

Morphic 3.0

It is a redesign of Morphic 2.0. It handles more general coordinate systems and transformations. Therefore Morph drawing is not specified in pixels anymore. It is oriented at programmers. It is implemented in the Squeak Smalltalk language and environment. It could be used to support applications programming, but could also support projects like MorphicWrappers and Etoys.

It is my intention with this historic review to show that although the main goal of the Smalltalk project is to make programming accessible by kids, much of the work done is about direct manipulation user interfaces. These are useful for many other kinds of software systems besides Etoys like environments. Professional developers can make very good use of Morphic like frameworks. The Morphic 2.0 system still represents the state of the art in this area. And Morphic 3.0 is a natural evolution of Morphic 2.0.

I’d like to thank Jecel Assumpção Jr. for recommending me the ARK video, for reading this and for his kind and useful comments.

 
 
  © 2006-2007 Juan M. Vuletich