The Self-4.0 User Interface: Manifesting a System-Wide Vision of Concreteness, Uniformity, and Flexibility
Total Page:16
File Type:pdf, Size:1020Kb
The Self-4.0 User Interface: Manifesting a System-wide Vision of Concreteness, Uniformity, and Flexibility Randall B. Smith, John Maloney†, and David Ungar Sun Microsystems Laboratories 2550 Casey Ave. MTV29-116 Mountain View, CA 94043 [email protected], [email protected], [email protected] Abstract ming systems seem pretty awkward and abstruse by comparison. Manipulating programs is hard, while manipulating Of course it would be a difficult and dubious objects in the physical world is often easy. Several attributes of the physical world help make it compre- effort to literally replicate the physical world in the hensible and manipulable: concreteness, uniformity, computer. But embodying key elements of our physi- and flexibility. The Self programming system cal reality might bring benefits to the computing attempts to apply these attributes to the world within experience. The rise of object-oriented programming the computer. The semantics of the language, the may be viewed as the outcome of an effort to allow efficiency and fidelity of its implementation, and the computers to more directly model physical systems. architecture of its user interface conspire to make the experience of constructing programs in Self immedi- However, even object-oriented programming sys- ate and tangible. We describe the mechanisms used tems don’t really give you anything like that real- to achieve this goal, and illustrate those mechanisms world sense of obvious straightforwardness, that within the context of an extended programming task. sense of immediacy. We believe something more can be found by reexamining the essence of physical sys- tems. I. Introduction Three important characteristics of physical reality that are not truly present in most program- There is a satisfying directness in working ming systems, even object-oriented ones, are con- with physical objects. You can pick things up, creteness, uniformity, and flexibility. In the Self inspect, poke and prod them, or stick them together. system, we have tried to marry the cognitive advan- Everywhere you go, it’s pretty much the same thing tages of objects with these three fundamental charac- — more physical objects. Move them out of the way, teristics, thereby making programming less walk around them, poke them some more. It’s all awkward, less abstruse. We hope that by so doing, very straightforward, and in fact it makes program- not only will the expert become more productive, but † Current address: Advanced Technology Group Apple Computer, Inc. Cupertino, CA 95014 the novice will have an easier time scaling the learn- sense of the tangible reminiscent of the physical ing slope. world. We will describe specifically how aspects of the language, the user interface, and the implementa- II. Concreteness tion together move the system forward along these three dimensions of concreteness, uniformity, and Concreteness was one of the original motiva- flexibility. The Self-4.0 user interface (along with the tions in the Self language design. A concrete object is elements of the programming environment it con- easy to comprehend: it can be manipulated and tains) is a part of the system that has not been directly inspected. The language’s contribution to the described elsewhere, and will be our primary focus. sense of concreteness arises largely from its use of But the language semantics and the implementation prototypes: the routine way to make new objects in are equal partners, sharing the common design cen- Self is to copy and extend an existing object. One can ter. see an example of what he will be working with, Our exposition will visit each of the three examine and even test it. In class-based systems, one elements in the Self mantra: concreteness, unifor- instantiates from a description, and thus deals on a mity, and flexibility. Concreteness: The language is less concrete level. based on an object model that encourages a direct, The Self-4.0 user interface helps create a copy-and-modify style of programming. The user sense of concreteness and directness by making a interface independently adds concreteness by sup- Self window act like a world of tangible objects. It porting immediate, direct access to any part of any achieves this effect with four important characteris- application, including the environment, even while it tics: physical look and feel, unique Self level repre- is running. Uniformity: The language merges state sentation, reification of layout constraints, and and behavior, abolishes the class/non-class distinc- composition through embedding. These characteris- tion, and uses object and message for everything. tics arise from the default behavior of the basic The user interface further increases the system’s uni- graphical object, called a “morph.” All display formity by using graphical objects down to the low- objects (circles, frames, buttons, pieces of text, and est levels, and by removing the distinction between so on) inherit morph behavior, and are therefore run and edit. Flexibility: Combining concreteness kinds of morphs, acquiring concrete behavior by and uniformity alone is a great aid to flexibility. The default. Also, any Self object can be viewed as a kind Self object manipulation facilities provided by the of morph called an “outliner,” so the task of modify- user interface, and the interface’s reification of a cen- ing or making new Self objects takes place in this tral language level concept, the “slot,” makes key concrete world. The four characteristics will be language level manipulations readily available. described one by one. The implementation is an important enabler: by being faithful to the language semantics and by 1] Physical look and feel generating highly optimized code, the penalties one would expect to pay for semantic purity are greatly The physical look and feel arises from the diminished. The programmer more often gets to way the user interacts with a morph. The Self inter- think about his Self world of objects without con- face is designed for a three button mouse. The left cerns for implementation details, so will be less button is used to grab and carry objects across the inclined to open “trap doors” into a more efficient screen. The grabbed object moves not as an outline language or to distort his programming style to gain of itself, but as a solid body, casting a drop shadow as efficiency. though the user had lifted the object above the two The result is a system with a particular over- dimensional world below. Because the Self user all feel — offering liveliness, more immediate feed- tends to work with many small morphs rather than a back, an almost tactile awareness of objects — a few large ones, the solid motion with drop shadow is (a) (b) Figure 1. In a Self window, the user pops up the meta menu on the ideal gas simulation (a). Selecting “outliner” gives the Self-level representation to the user, which can be carried and placed as needed. (The italic items at the bottom of the outliner represent slot categories that may be expanded to view the slots. Unlike slots, categories have no language level semantics and are essentially a user interface convenience.) an important part of making the system feel like a chose the more physical action on contact approach world of tangible objects. to enhance the sense of concreteness. In another The right mouse button is used to pop-up a common alternative, the cursor becomes a tool for “meta menu,” which is the same for all objects. The direct interaction. (For example, the cursor might meta menu has items like “dismiss,” “change color,” become a paint bucket for doing object color fills in a “resize,” and “grab.” The grab item is useful for but- graphics editor.) This is more direct than the selected tons and slider morphs, which override the default object approach, but it still requires that the user slide left button grab behavior in order to act like conven- the mouse over to a palette to change cursor modes. tional user interface elements. The middle button is We believe the action on contact paradigm is both used by each object to pop-up a menu specialized to direct and quick, since the user specifies the object of its own usage. A text editor, for example, might have action and invokes the menu in a single gesture: there cut, copy, and paste items on its middle button menu. is no need to acquire a distant target with the mouse. The use of pop-up menus might be called Action on contact is not achieved everywhere in the “action on contact.” Action on contact furthers the Self user interface (any use of a graphically disjoint sense of direct, concrete feel. One well-known alter- tool violates the paradigm) but it is an important native to pop-up menus is the “selected object” para- guiding principle that supports a sense of direct digm, in which an object is first selected and then action. acted upon by graphically disjoint tools. (Consider To illustrate these points, we introduce what most graphics editors or text editors for example, in will become a running example throughout the paper. which selected text or object can have various opera- A Self-4.0 user (who might be a professional pro- tions performed on it through pull down menus or grammer, or a somewhat sophisticated and motivated palettes of tools.) While the selected object paradigm end user) wishes to change and extend an ideal gas has its advantages (it’s good for single button mice, simulation. The simulation appears as a simple rect- and presents a more visually manifest interface) it is angular container (a “gas tank”) in which atoms, rep- fundamentally based on action at a distance. We resented as disks, are bouncing around.