Pen-Based Computing The Journal of Stylus Systems

Smalltalk: An Environmental Alternative for Pen Systems

Volume 1, Number 5 · November 1991 · Pages 4, 5

From the Original Pages

Click a page to enlarge · Alt-click to open the full issue

The recent announcement by Momenta has put object-oriented programming and the Smalltalk programming language into the pen-based headlines.

Object-oriented programming (OOP) will be the dominant approach to application development in the coming years and clearly offers some benefits to pen-based computing. OOP produces compact and “reusable” code that can be shared (or “reused”) by different parts of the program. Since duplicate code isn’t scattered throughout the system, program size is reduced, which is critical for memory-efficient notepad systems. There are other benefits too, including faster development and greater consistency within the application. GO’s PenPoint uses object-oriented techniques in its C language development environment. And Momenta’s development environment is based on the venerable Smalltalk object-oriented programming language. The extensible Smalltalk environment provides many features required by pen-based systems — fonts, windows, graphics, and the like — and may be an attractive alternative for pen-based developers.

Who’s Providing OOP Tools?

Although there are OO languages like Smalltalk and C++, object-oriented programming doesn’t require an OO language. The OO approach can be undertaken with just about any language. (See, for example, “An Object-Oriented Approach to Assembly Language Programming,” Dr. Dobb’s Journal, November 1990.) As mentioned above, GO’s PenPoint is object-oriented (except for its kernel), yet written in C and assembly language. Central to PenPoint’s “object-orientedness” is the class manager — code that provides inheritance, subclassing, and message passing and generally controls the behavior of objects in the system.

However, Smalltalk is currently the only announced pure object-oriented development environment for pen-based systems. So far, two Smalltalk implementations have been announced, although only one is actually shipping.

While the details of the hardware and software are still sketchy, Smalltalk Express Ltd.’s implementation of ParcPlace System’s (Mountain View, CA) Smalltalk-80 is the operating environment for the Active Book Corporation’s yet-to-be-released stylus system. (Both Active Book and Smalltalk Express are British companies, although Object Express in Evanston, Illinois is Smalltalk Express’s U.S. outpost.) We’ve heard that Active Book’s delay is because the company has changed directions, moving to the PenPoint operating system from Perihelion’s Helios parallel operating system.

The Momenta environment, on the other hand, is based on Digitalk’s (Los Angeles, CA) Smalltalk implementation called Smalltalk/V. Furthermore, Momenta turned to Object Technology International (Ottawa, Ontario) to implement and embed Smalltalk in ROM. Momenta accomplished this using OTI’s ENVY line of Smalltalk tools that include ENVY/Smalltalk. The process by which Smalltalk ROMing is accomplished is detailed in “Smalltalk and Embedded Systems” by John Duimovich and Mike Milinkovich, Dr. Dobb’s Journal, October 1991; parts of the following discussion are based on Duimovich and Milinkovich’s article.

A Smalltalk Backgrounder

Smalltalk is not just another programming language. It’s a complete development environment, consisting of the language, a comprehensive set of programming tools, and a rich library of reusable objects. It’s also extensible in that tools and features can easily be added to the environment. (Momenta, for instance, created a unique NextStep-like development environment named “Builder” which, in run mode, generates framework code, allowing the programmer to simply fill in the application specific code. The Builder is bi-directional: it generates code, modifies the layout, and then re-generates the layout and code.) The Momenta Builder itself was based on Acumen Software’s (Palo Alto, CA) Builder and Widgets/V 286 products, development add-on packages for Smalltalk/V which includes an interactive editor for point and click development and an extensive user interface object library that sports visual objects for use in graphical user interfaces — window styles, hierarchical pop-up and pull-down menus, list boxes, text editor, scrolling pages, radio buttons, and palettes of forms.

Incremental Development

One of the major features of the Smalltalk development environment is its support for incremental development. Instead of relegating developers to the traditional edit-compile-link-run cycle, Smalltalk supports incremental compilation.

New routines can be added and tested quickly, allowing programmers to build their programs one small piece at a time, trying out new ideas and alternative implementations as they go. It is largely this feature which has given Smalltalk its reputation as an excellent prototyping tool. Momenta programmers, for example, created and added nearly 100 interface classes to the standard Smalltalk/V environment. (Other added Momenta enhancements include outline font technology, more advanced graphics, and communications support–fax, laser printers, etc.)

But rapid development is the main thing programmers find attractive about Smalltalk. As one Momenta programmer told us, “Smalltalk [provided] the only way we could envision getting this project [i.e., Momenta environment and tools] done in the time we had.”

Virtual Machines and Portability Vehicles

Most Smalltalk implementations use byte-code interpreters known as “virtual machines” to provide the execution environment. The virtual machine takes care of such tasks as executing the Smalltalk byte codes (virtual machine instructions), managing memory, and interfacing to the underlying OS. Smalltalk source code is compiled to a byte code representation which is then executed by the virtual machine. Fully-compiled Smalltalks exist, as well as implementations that use byte codes but maintain a cache of fully compiled methods to improve performance. On top of the virtual machine rests the “image” containing the code and data which together make up the development environment and any applications under development.

Smalltalk’s architecture is an excellent vehicle for achieving portability. The virtual machine insulates the application from the underlying OS and hardware. Typical virtual machines consist of only about 3000 lines of low-level code. Once this has been ported to a new target, Smalltalk source code (or even complete images) can be run immediately on the new platform.

Too Big and Slow?

Historically, the biggest compliant about Smalltalk is that it’s big and slow, and presumably too lumbering for notebook systems. But since the language has an “open” architecture, programmers can pare-back non-essential elements (like an overabundance of fonts). Nevertheless, acceptable and competitive performance is one of the greatest concerns of Smalltalk developers.

Note from the Editors Welcome to the fifth issue of Pen-Based Computing, our last full-length issue of 1991. We will be publishing a special edition in mid-November with a wrap-up of news from Fall Comdex and other new developments. Many of you will be renewing your subscriptions in the coming months. We are pleased to announce that we now accept VISA and Mastercard for your convenience. As always, please feel free to contact us with your comments, suggestions, or information about your company’s products.

Transcribed from Pen-Based Computing, Volume 1, Number 5 — November 1991. Pages 4, 5.