Macintosh-Specific Development Issues

These are several issues that relate directly to Macintosh development. Readers familiar with Unix or Windows programming will find these of interest when analyzing this Mac development.

The first issue is one, perhaps, of curiosity: Why use Macintoshes when Windows machines are more pervasive? The answer is twofold:

Experience. There are 9 man-years of Macintosh programming experience between us. Thus, pragmatically, it was easier to design and work on a platform we've been designing and working on for years. We are familiar with the development environment; we know the Mac's quirks; we have easy 24-hour access to powerful Macintosh machines. It seemed logical to concentrate our development efforts on implementing a product, not learning a platform.

Network support. Since most Macintoshes are networked, the system software provides powerful tools for networking. System 7 has been available since 1991; its Apple Event Manager provides a powerful mechanism for network communications. It isolates very effectively the details of network hardware and protocols, and allows developers to concentrate their efforts on implementing a product, not talking to network wires.

The Macintosh-specific development issues include: cooperative multitasking; the Apple Event Manager; and the Thread Manager.

Apple System Software version 7.x (System 7) offers no preemptive multitasking feature. It does offer a multitasking scheme known as "cooperative" multitasking: each application must be "nice" and give up the CPU at frequent, well-defined intervals (on the order of sixtieths of a second). "In System 7 (or with MultiFinder in earlier versions), the available processing time is distributed among multiple processes through a procedure known as context switching (or just switching). All switching occurs at a well-defined time, namely, when an application calls WaitNextEvent" (IM: Toolbox Essentials 1992, 2-15). This model is a bit more troublesome for developers, but to the users, there is not much difference between cooperative multitasking and preemptive multitasking, provided the developers follow the rules.

An integral part of System 7 is the Apple Event Manager. Apple Events are messages sent from one application to another, or even to itself (IM: IAC 1993, 3-3). The details of network hardware is masked as much as possible from software engineers: Use of the Apple Event Manager allows the developer simply to send Apple Events between applications without excessive concern about the physical location of the applications -- ie, one application may be on the local machine and the other application may be across the network; on the whole, the developer need not worry about which is which. For a notable exception, see Appendix 2: "Trap Patches Required for PowerWeb".

The Thread Manager is part of System 7.5, and is available as a system extension for earlier systems. "The Thread Manager is the current MacOS solution for lightweight concurrent processing" (Thread Manager 1994, 2). The Thread Manager gives developers different threads of execution. Since each thread relies to a large degree on the currently-executing application's resources, switching times are negligible: The information saved by the Thread Manager at switch time includes only registers, enabling a very fast switching time.