Three Kinds of Programs: Cocoa, Carbon, Classic

Mac OS X was supposed to make life simpler. It was supposed to eliminate the confusion and complexity that the old Mac OS had accumulated over the years—and replace it with a smooth, simple, solid system.

In a few years, that’s exactly what Mac OS X will be. For the moment, however, you’re stuck with running three different kinds of programs, each with different characteristics: Cocoa, Carbon, and Classic.

The explanation involves a little bit of history and a little bit of logic. To take full advantage of Mac OS X’s considerable technical benefits, software companies must write new programs for it from scratch. So what should Apple do—send out an email to the authors of the 18,000 existing Mac programs, suggesting that they throw out their programs and rewrite them from the bottom up?

At big companies like Microsoft and Adobe, such a suggestion would wind up on the Joke of the Week bulletin board.

Instead, Apple gave software companies a break. It wrote Mac OS X to let programmers and software companies choose precisely how much work they wanted to put into compatibility with the new system. The various levels include:

  • Do nothing at all (Classic). Let’s face it: Software companies go out of business, unprofitable product lines are dropped, and shareware authors go off to law school. All of them leave behind orphaned programs that run only on the old Mac OS.

    Your Mac OS X machine can still run this entire library of older software. When you try to open one of these older programs, Mac OS X launches a Mac OS 9 simulator called the Classic environment. Suddenly your screen is taken over by the ghost of Mac OS 9. Sure, you leave behind all the trappings (and benefits) of Mac OS X—its new look, crash protection, and so on—but at least you’re still running your favorite programs.

    The point here is that Mac OS X doesn’t necessarily relieve you of having to know something about Mac OS 9. Like it or not, until a huge library of Mac OS X programs is available, most people wind up having to master both Mac OS X and certain elements of Mac OS 9.

    See Chapter 5 for much more detail on the Classic environment.

  • Update the existing programs (Carbon). If software companies and programmers are willing to put some effort into getting with the Mac OS X program, they can simply adapt, or update, their existing software so that it works with Mac OS X. The resulting software looks and feels almost every bit like a true Mac OS X program—you get the crash protection, the good looks, the cool-looking graphics, the Save sheets, and so on—but behind the scenes, the bulk of the computer programming is the same as it was in Mac OS 9. These are what Apple calls Carbonized programs, named for the technology (Carbon) that permits them to run on Mac OS X.

    Most Carbonized programs don’t offer all of the features available to Mac OS X, however. In the following pages, you’ll discover which Mac OS X goodies you sacrifice when using programs adapted in this way.

    On the other hand, such software offers a spectacular feature that software companies like a lot: the ability of a single Carbonized program to run on both Mac OS 9 and Mac OS X. (Not all do—Microsoft Office X doesn’t run on Mac OS 9, for example.) For the next few years, most of the big-name software companies will produce nothing but Carbonized programs.

    Other examples of Carbonized programs include AppleWorks, iMovie 2, iTunes, Photoshop, FileMaker, Internet Explorer, and, believe it or not, the Finder itself.

  • Write new programs from scratch (Cocoa). As Mac OS X becomes a bigger and bigger hit, more and more programmers and software companies create new programs exclusively for it. The geeks call such programs Cocoa applications. Although they look exactly like Carbonized programs, they feel a little bit more smooth and solid. They may run slightly slower than Carbonized programs (witness iMovie 2 vs. iMovie 3), but they offer a number of special features not offered by Carbonized programs.

    Many of the programs that come with Mac OS X are true Cocoa applications, including iMovie 3, iDVD, Safari, iChat AV, iPhoto, TextEdit, Stickies, Mail, Address Book, and so on.

Tip

Having trouble keeping the definitions of Carbon and Cocoa straight? You wouldn’t be alone; it’s like reading a novel where two characters’ names start with the same letter. Here’s one way to remember: Carbon programs are generally the older ones, those that might require carbon dating techniques to calculate their ages.

Get Mac OS X: The Missing Manual, Panther Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.