Tuesday, September 04, 2007

morphic / etoys is a superior graphical user interface and programming development system

Morphic is a superior dynamic graphics system which remains undiscovered by our formal education system and so remains hidden from our youth and teachers. It has been around since circa 1995.

The purpose of this article is to outline the argument for superiority. A different article could be written discussing the reasons for the remarkable fact that a superior system has remained largely undiscovered by education systems for over 10 years.

A quick look at the main design features, with screenshots, makes the superiority of morphic clear. The manipulations and screen shots were done in a recent version of squeak obtained from the squeakland site.

1. Concreteness and Directness

Everything on the screen is a morph and can be directly touched and manipulated. Action by contact not action at a distance.

By direct manipulation programming, using the halos, I can quickly alter the size, colour, border and drop shadow of the original rectangle, as shown.

Or I can use the menu halo to alter a closed curve morph to an open curve and use the handles to reshape it.

2. Liveness

If I click on the cyan coloured halo which has an eye icon, then an interactive Viewer pops up which enables me to see the car's x and y co-ordinates and heading in real time. I can also make the car move, turn, make noises and many other things (only part of the Viewer is shown in the screenshot)

The script can be changed even as it runs, allowing the user to see the effect of script changes immediately. The script can be turned on and off directly through the clock icon. Just as you don’t have to (and can’t!) turn off the laws of physics before manipulating an object in the real world, you needn’t suspend stepping before manipulating a morph or even editing its code.

In morphic any morph can have a life of its own: object inspectors update, piano rolls scroll, movies play:

What are morphs? What can they do?

morph = shape or form, from the Greek.

Morphic is a subset of classes within the the Squeak / Smalltalk programming language.

All the things you see on the screen are morphs. So the Squeak GUI is built from morphic and can be reprogrammed if you have the skill and inclination to do that.

Morphs can be programmed to:
  • perform actions in response to user inputs
  • perform actions when they interact with other morphs
  • perform actions at regular intervals
  • control the placement and size of submorphs in building more complex objects
With morphic there is more variety than with more conventional GUI builders

Some history

The first version of morphic was developed by John Maloney and Randy Smith at Sun Microsystems Laboratories as the user interface construction environment for the Self 4.0 system. Self is a prototypebased language, similar to Smalltalk but without classes or assignment. ... For Squeak, morphic was re-written from scratch in Smalltalk.


The Halo features (direct manipulation programming of size, colour etc.) and the Viewer features (a dynamic graphical inspector and browser) are what make morphic superior to other systems IMHO. Other systems have part of the Scriptor feature (a place to define, edit, test, save and schedule scripts) but not all of it. They don't have late binding, the ability to make changes while the system is running. The ability to test and reprogram on the fly while the program is running is an enormous boost to understanding variables and debugging code.

An Introduction to Morphic: The Squeak User Interface Framework by John Maloney
This describes morphic, how it works, design principles, some history and compares it with the MVC (Model-View-Controller) framework. The author is one of the original developers of morphic.

Morphic - The Squeak User Interface by Juan Manuel Vuletich
An excellent introduction to the history and design of Morphic. Describes the evolution of Morphic from MVC and Self

Morphic tutorials

No comments: