Mac OS X Unleashed

Mac OS X Unleashed

By John Ray and William C. Ray

Carbon

Steve Jobs announced the addition of Carbon to the list of OS X technologies by stating that "all life is based on Carbon." As I've mentioned elsewhere in this chapter, Mac OS X was originally planned to be nothing more than a made-over version of the OpenStep operating system. When developers refused to bite at the new programming interface, it became obvious that there needed to be an easier transition for existing Mac developers.

Carbon is a rewriting of the existing Macintosh toolbox to take advantage of the new technologies in Mac OS X. It also removes routines that were rarely used and incompatible with an advanced operating system environment (such as direct access to system memory).

When an application is written in Carbon, it can run on both Mac OS X and on Mac OS 8/9 (with a free piece of software called CarbonLib installed). With a minimum amount of effort, a developer can take a piece of software that was written for early versions of Mac OS, update it to use Carbon, and end up with an application that runs natively in both OS X and Mac OS 8/9.

Figure 1.7 shows a popular development environment called RealBasic running on System 9.2. The same application is shown in Figure 1.8 under Mac OS X. Aside from the interface differences, they function identically and run from the same binary file.

01fig07.jpg

Figure 1.7 This is RealBasic, running on Mac OS 9.2…

01fig08.jpg

Figure 1.8 …and on Mac OS X!

As Steve Jobs hinted, Carbon is the basis for all current life on the Macintosh platform. Almost all existing applications can be ported to OS X using Carbon. This is not, however, the only way to build applications. OS X offers two other APIs: Cocoa and Java.

Share ThisShare This

Informit Network