What Is Stationery?

Architecture of an Application that Supports Stationery

An application that doesn't use stationery has knowledge of all the slots that make up a soup entry, regardless of where they are in the application. For instance, our Bookstore application has a slot editor for the price slot in the entry view. The newtOverLayout has an OverviewAbstract method which reads (among other slots) the price slot. Last, but not least, we initially got the soup entry from the allSoups frame which used CreateBlankEntry to initialize the price slot. This type of application functions much like the gears shown in FIGURE 11.5: everything tightly meshed together, one gear depending upon another to be able to do its job.

FIGURE 11.5 : Gears representing a non-stationery-based application.


With stationery-based applications, things work much differently. Stationery-based applications pull many pieces out of the application and put them into separate objects which multiple applications can use. These objects are registered with the system so that they can work with a given application. As with the gears shown in FIGURE 11.6, this type of application functions by having some gears that are pluggable. They fit into certain "correctly sized" spots in the application. When all the gears are plugged in, then everything turns quite nicely.

FIGURE 11.6 : Gears representing a stationery-based application.


What this stationery model provides is the easy extension of the original application. Because the application doesn't have the specifics of all the slots in the soup entries embedded in it--anyone can take advantage of that information.

Admittedly, even a stationery-based application will have knowledge of some slots--application-specific slots such as the creation date for the Notepad, or the sortBy slot in the Names application. Other than those very application-specific slots, stationery will be responsible for all other slots.

As a result, the application takes a higher-level view of things. Should this be a card-style or roll-style application? How should soup entries be ordered? What operations can be performed on soup entries? The particulars of each kind of data are left up to the stationery. The application goes along its merry way, expecting the stationery to do its part when called upon.


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996