Preface

This book is about Mac OS X specifically, the many UNIX features that compose and distinguish the system. It is also intended to introduce UNIX developers to the world of Mac OS X development environments, frameworks, and technologies. UNIX developers will find a lot to like about Mac OS X: its UNIX-based core operating system (called Darwin); its set of BSD-based commands and tools; its inclusion of traditional UNIX development tools like gcc, gdb, awk, sed, and Perl; and its development frameworks and technologies all provide a compelling platform for a UNIX developer. Collectively, these components and technologies enable you to create powerful and useful programs with modern graphical user interfaces.

Given all the high-quality releases of UNIX available today?from commercial products like Solaris to free distributions such as Linux and FreeBSD?you may wonder why you should care about another flavor of UNIX. The short answer is that Mac OS X is more than just another UNIX distribution: on top of the core UNIX system, you get a well-thought-out, consistent user interface; access to a wealth of Macintosh software; and some exciting new technologies that are not available under other UNIX-based systems. In fact, Mac OS X is a successful melding of two distinct systems and cultures into a single computing environment.

On one hand, Mac OS X functions as a Macintosh system with an updated user interface, which Apple calls Aqua; you can run your favorite Macintosh applications as well as new programs written specifically for Mac OS X. On the other hand, Mac OS X is a fully functioning UNIX system that you can use from the command line and that supports all your favorite UNIX tools, commands, and applications such as Apache (http://www.apache.org) and MySQL (http://www.mysql.com).

Underneath the Aqua interface, many of the core system features are provided by UNIX and UNIX programs. For example, you start and stop Mac OS X?s built-in web server with the GUI-based System Preference application. What you don?t see from the GUI is that the web server is really Apache, the most popular web server in the world. If you like, you can also start and stop the server from the command line. Similarly, remote login is provided by OpenSSH.

Darwin, the core operating system for Mac OS X, is a true BSD-like operating system. Darwin is also open source, so you have full access to all the source code. On top of Darwin are the software layers that add the Macintosh services and functionality to Mac OS X. If you like, you can download the Darwin kernel and use it as a stand-alone UNIX system on either Macintosh or Intel hardware. (Only Darwin, the UNIX portion of the system, can be run on Intel hardware; for the Macintosh-specific components, such as the Aqua user interface, you still need a full Mac OS X installation.)

When most Macintosh users look at the system, they see a Macintosh with an enhanced interface. When UNIX users look at the system, they see UNIX with a Macintosh desktop. The beauty is that out of the box, one system services the needs of both kinds of users, and you can customize the system in either direction.

This arrangement may seem a bit odd and slightly counterintuitive. For instance, UNIX is known as an operating system built for, and by, programmers; users were an afterthought. The Macintosh is known as a computer built from the ground up for usability, with its complexity hidden behind a GUI?it?s a computer for everyone. In a sense, these systems stand at different ends of the computing spectrum. Though such a statement is a gross generalization, UNIX users tend to be technically aware and use the system to support engineering, research, and systems-level application development tasks (although this characterization has changed somewhat with the acceptance of Linux). UNIX users enjoy the OS?s ?complex simplicity? and its infinite possibilities.

Traditionally, Macintosh users haven?t wanted to know about or see the details of the system. From their point of view, the aesthetics are in the applications and the elegant, easy-to-use interface, not in the details of the OS or some abstract command set. Mac OS X exists as an integrated system, where Macintosh and UNIX each benefit from the other. Macintosh users still have their easy-to-use computer, but they get the performance and stability enhancements of UNIX. UNIX users keep all the power and possibilities of UNIX, but now have a consistent and easy-to-use interface, a host of new software, and application compatibility with the world.

Once you use the system, I think you will agree that this is a powerful combination, full of possibilities. As a long-time Macintosh user and a long-time UNIX developer, I am thrilled with Mac OS X. If Apple continues to push forward on both fronts, the platform is sure to attract more users and developers, which will grow it for years to come. As far as I?m concerned, Apple has a real winner on its hands!

I sincerely hope you enjoy learning about Mac OS X and will see the benefits you can derive from the system. I have found Mac OS X to be a comfortable and powerful work environment for general computing, as well as software development. I hope this book gets you interested in the platform and helps you to begin a long and fruitful journey toward developing software for Mac OS X.