HOME

TheInfoList



OR:

In
Apple Macintosh The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and software ...
computer programming Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as anal ...
, Component Manager was one of many approaches to sharing code that originated on the pre-
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple– IBM ...
Macintosh. It was originally introduced as part of
QuickTime QuickTime is an extensible multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. Created in 1991, the latest Mac version, QuickTime X, is a ...
, which remained the part of the
classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer from 1984 to 2001, starting with System 1 and ending with Mac OS 9. Th ...
that used it most heavily.


Technical details

A ''component'' was a piece of code that provided various functions that may be invoked by clients. Each function was identified by a signed 16-bit integer ID code. Non-positive codes were reserved for predefined functions that should be understood by all components—open/close a component instance, query whether a function was supported, etc. The meanings of positive function codes depended on the type of component. A ''component instance'' was created by ''opening'' a component. This called the component's open function to allocate and initialize any necessary storage for the instance. Closing the instance got rid of this storage and invalidated all references to that instance. Components and component instances were referenced by 32-bit values that were not
pointer Pointer may refer to: Places * Pointer, Kentucky * Pointers, New Jersey * Pointers Airport, Wasco County, Oregon, United States * The Pointers, a pair of rocks off Antarctica People with the name * Pointer (surname), a surname (including a list ...
s. Instead, they were interpreted as keys into internal Component Manager tables. These references were generated in such a way that, once they became invalid, those values were unlikely to become valid again for a long time. This minimized the chance of obscure bugs due to dangling references. Components were identified by
OSType A FourCC ("four-character code") is a sequence of four bytes (typically ASCII) used to uniquely identify data formats. It originated from the OSType or ResType metadata system used in classic Mac OS and was adopted for the Amiga/Electronic Arts I ...
codes giving their ''type'', ''subtype'' and "''manufacturer''". For instance, a component type might be "raster image compressor", subtypes of which might exist for JPEG, H.261, Sorenson, and Intel Indeo, among others. It was possible to have multiple components registered with exactly the same identification codes, giving alternative implementations of the same algorithm for example using hardware versus software, trading off speed versus quality, or other criteria. It was possible for the applications to query the existence of such alternatives and make explicit choices between them, or let the system choose a default. Among the options available, a component could ''delegate'' parts of its functions to another component as a form of subclassing for code reuse. It was also possible for one component to ''capture'' another, which meant that all accesses to the captured component had to go through the capturing one.


Mac OS Components

Mac OS accumulated a great variety of component types: * Within
QuickTime QuickTime is an extensible multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. Created in 1991, the latest Mac version, QuickTime X, is a ...
, there were image codecs, media handlers, media data handlers, video digitizer drivers, file format importers and exporters, and many others. * The Sound Manager moved to a predominantly component-based architecture in version 3.0: sound output devices were represented as components, and there were also component types for mixing multiple channels, converting between different sample rates and sample sizes, and encoding and decoding compressed formats. *
AppleScript AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system aut ...
introduced the concept of scripting languages implemented as components. *
ColorSync This is a list of macOS built-in apps and system components. Applications App Store The Mac App Store is macOS's digital distribution platform for macOS apps, created and maintained by Apple Inc. based on the iOS version, the platform wa ...
implemented different colour-matching methods as components. * QuickDraw GX "font scalers" were renderers for the different font formats.


References

{{reflist Macintosh operating systems development Component-based software engineering