Morphic - The Squeak User Interface

by Juan Manuel Vuletich
Back to Juan's studio



Morphic allows merging Model and View in a single Morphic object that besides being a model, it also knows about user interaction. The controller is no longer needed. This is simpler, but won't allow for different views on the same model. If this is desired, model and view can be separated; making a non-morphic object for the model, and a morph for the view. The event propagation mechanism is available for communicating the view and the model in the same fashion as in MVC.  (The MorphicWrappers package developed by the MathMorphs group avoids the need to build a view for every model, by means of standard views or wrappers, which allows Morphic manipulation of any Smalltalk object.) Therefore, Morphic is both simpler and more flexible. It allows us to think in Models and Views or in Graphical Objects at our choice.

What are Morphs?

Morphic is based on a simple and general idea: Some objects can interact with the user, knowing how to render themselves on a Display, and how to react to user actions. They are called Morphs (From the Greek, shape or form).

"In addition, a morph may:
1.  perform actions in response to user inputs;
2.  perform an action when another morph is dropped onto it, or when it is dropped onto another morph;
3.  perform an action at regular intervals; and
4.  control the placement and size of its submorphs.
Any morph can have component morphs (called submorphs). A morph with submorphs is called a composite morph. The submorphs are said to be embedded in the composite morph. The submorphs can in turn be composite morphs, to any depth. Each morph can be embedded in at most one composite morph, so the submorph relation defines a tree of morphs. A composite morph is treated as a unit; moving, copying, or deleting a composite morph causes all its submorphs to be moved, copied, or deleted as well."