Datasheet
Cocoa
Cocoa applications are specifically developed for Mac OS X. Cocoa applications are incompatible
with older Macintosh operating systems and, therefore, do not run on Mac OS 9. Cocoa applications
take advantage of all of Mac OS X’s modern OS features, such as advance memory management,
preemptive multitasking, symmetric multiprocessing, and the Aqua interface. Apple evangelizes
Cocoa for its modern object-oriented programming techniques and rapid application development
tools, which make application development significantly faster and easier than for Carbon. Some
examples of Cocoa applications are OS X’s Mail and Preview applications as well as Netopia’s
Timbuktu for Mac OS X.
Carbon
The greatest advantage of the Carbon application environment is that developers can build applica-
tions that run in either Mac OS 9 or OS X. When running within OS X, Carbon applications take
advantage of most of OS X’s modern OS features, including the Aqua interface. In order for Carbon
applications to run within Mac OS 9, the CarbonLib library must be present within the Extensions
folder within the Mac OS 9 System folder. Ironically, some Carbon applications do not run under
Mac OS 9. The most prominent is Microsoft’s Office Version X for Mac.
Java
The Mac OS X Java environment is Java 2 Standard Edition-compliant. It can run both Java appli-
cations and applets. The key advantage of Java development is that Java applications can run on
any platform that contains a cross-compatible Java Virtual Machine.
BSD
The BSD application environment usually deals with command-line executable shell scripts. A
shell script is similar to an MS-DOS batch file in that they’re both text files that contain a sequence
of commands. Interestingly enough, shell scripts do not necessarily have to be executed from the
command line. Shell scripts can be implemented within Cocoa applications, allowing them to be
executed from the GUI.
Packages and bundles
A package, sometimes referred to as a bundle, is a single-icon, point-and-click representation of an
application. Mac OS X’s Carbon and Cocoa applications can be comprised of multiple subordinate
files and resources. In the GUI, all of these subordinate pieces are neatly wrapped up into a repre-
sentation of a single executable file for the end user. To view the contents of an application package,
simply press and hold the Control key while highlighting the Carbon or Cocoa application icon.
You’re then provided the option to show the package’s contents. For illustration purposes, Figure 1.1
depicts the contents of Safari for Mac OS X.
Frameworks
Mac OS X frameworks contain dynamically loading code shared by multiple applications.
Frameworks alleviate the need for applications that contain common code to individually load that
code for each instance of those applications running simultaneously.
7
Introduction and Installation of Mac OS X
1
05_041741 ch01.qxp 2/2/08 12:08 AM Page 7