< Previous PageNext Page > Hide TOC

Mac OS X System Overview

This chapter provides a high-level introduction to Mac OS X, describing its overall architecture and development tools support. The goal of this chapter is to orient you to the Mac OS X operating system and to give you a reference point from which to explore the available tools and technologies described throughout this document. Developers who are already familiar with the Mac OS X system architecture and technologies may want to skip this chapter.

Note: For a listing of commonly used Mac OS X terms, see “Glossary.”

In this section:

A Layered Approach
The Advantage of Layers
Developer Tools


A Layered Approach

The implementation of Mac OS X can be viewed as a set of layers. At the lower layers of the system are the fundamental services on which all software relies. Subsequent layers contain more sophisticated services and technologies that build on (or complement) the layers below. Figure 1-1 provides a graphical view of this layered approach, highlighting a few of the key technologies found in each layer of Mac OS X.


Figure 1-1  Layers of Mac OS X

Layers of Mac OS X

The bottom layer consists of the core environment layer, of which Darwin is the most significant component. Darwin is the name given to the FreeBSD environment that comprises the heart of Mac OS X. FreeBSD is a variant of the Berkeley Software Distribution UNIX environment, which provides a secure and stable foundation for building software. Included in this layer are the kernel environment, device drivers, security support, interprocess communication support, and low-level commands and services used by all programs on the system. Besides Darwin, this layer contains several core services and technologies, many of which are simply higher-level wrappers for the data types and functions in the Darwin layer. Among the available core services are those for doing collection management, data formatting, memory management, string manipulation, process management, XML parsing, stream-based I/O, and low-level network communication. For details about the technologies in this layer, see “Darwin and Core Technologies.”

The Graphics and Media layer implements specialized services for playing audio and video and for rendering 2D and 3D graphics. One of the key technologies in this layer is Quartz, which provides the main rendering environment and window management support for Mac OS X applications. QuickTime is Apple’s technology for displaying video, audio, virtual reality, and other multimedia-related information. Apple’s core technologies, including Core Image, Core Video, Core Animation, and Core Audio, provide advanced behavior for different types of media. OpenGL is an implementation of the industry-standard application programming interface (API) for rendering graphics and is used both as a standalone technology and as an underlying technology for accelerating all graphics operations. For details about the technologies in this layer, see “Graphics and Multimedia Technologies.”

The Application Frameworks layer embodies the technologies for building applications. At the heart of this layer are the basic environments used to develop applications: Cocoa, Carbon, Java, and others. Each environment is designed to provide a level of familiarity to certain types of developers. For example, Cocoa and Java provide object-oriented environments using the Objective-C and Java languages while Carbon provides a C-based environment. This layer also contains numerous supporting technologies, such as Core Data, Address Book, Image Services, Keychain Services, Launch Services, HTML rendering, and many others. These technologies provide advanced user features and can be used to shorten your overall development cycle. For details about the technologies in this layer, see “Application Technologies.”

The User Experience layer identifies the methodologies, technologies, and applications that make Mac OS X software unique. Apple provides countless technologies to implement the overall user experience. Many of these technologies simply work, but some require interactions with the software you create. Understanding what interactions are expected of your software can help you integrate it more smoothly into the Mac OS X ecosystem. For details about the technologies in this layer, see “User Experience.”

The Advantage of Layers

The nice thing about the Mac OS X layered design is that writing software in one layer does not preclude you from using technologies in other layers. Mac OS X technologies were built to interoperate with each other whenever possible. In cases where a given technology is unsuitable, you can always use a different technology that is suitable. For example, Cocoa applications can freely use Carbon frameworks and BSD function calls. Similarly, Carbon applications can use Objective-C based frameworks in addition to other object-oriented and C-based frameworks. Of course, in the case of Carbon, you might have to set up some Cocoa-specific structures before creating any Cocoa objects, but doing so is relatively trivial.

Although you may feel more comfortable sticking with your chosen development environment, there are advantages to straying outside of that environment. You might find that technologies in other layers offer better performance or more flexibility. For example, using the POSIX interfaces in the Darwin layer might make it easier to port your application to other platforms that conform to the POSIX specification. Having access to technologies in other layers gives you options in your development process. You can pick and choose the technologies that best suit your development needs.

Developer Tools

Mac OS X provides you with a full suite of free developer tools to prototype, compile, debug, and optimize your applications. At the heart of Apple’s developer tools solution is Xcode, Apple’s integrated development environment. You use Xcode to organize and edit your source files, compile and debug your code, view documentation, and build all manner of software products.

In addition to the Xcode application, Mac OS X also provides you with a wide selection of open source tools, such as the GNU Compiler Collection (GCC), which you use to build Mach-O programs, the native binary format of Mac OS X. If you are used to building programs from the command line, all of the familiar tools are there for you to use, including makefiles, the gdb debugger, analysis tools, performance tools, source-code management tools, and many other code utilities.

Mac OS X also provides many other tools to make the development process easier:

Installing the developer tools also installs the header files and development directories you need to develop software. For information on how to get the developer tools, see “Getting the Xcode Tools.” For more information about the tools themselves, see “Mac OS X Developer Tools.”



< Previous PageNext Page > Hide TOC


© 2004, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.