An Introduction to Mac OS X Development Technologies

The most important thing to know before you begin building applications using Mac OS X is that it's very likely that the cross-platform development technologies you already know are built in to the platform. Mac OS X delivers a wealth of development technologies, from the advanced productivity of the Cocoa object-oriented frameworks, to full J2SE 1.3 and 1.4.2 implementations, to a vast selection of common UNIX tools and scripting languages. Apple even provides the advanced Xcode Tools software development environment free of charge with every copy of Mac OS X so that you can start building great applications as soon as you get your Mac.

Understanding which of the many development technologies available for Mac OS X to employ in your application depends on understanding your requirements both for development and deployment. What is the target platform for your application? Is it a desktop or server application? Are you targeting more than one platform?

Desktop Application Development

For applications that target Mac OS X specifically, Apple provides two native environments for development:

The Cocoa environment provides an advanced, object-oriented API for Mac OS X that makes it easy to create complex applications using very little code. The secret is in the power of the Cocoa frameworks themselves: they provide enormous amounts of useful functionality out of the box so that developers can focus on writing the code that's specific to the domain of their application. The result is that developers can write—and test and maintain—fewer lines of code than would be necessary to meet the same functional requirements using other application development APIs.

The Carbon environment provides fine-grained procedural APIs in C and C++ that are intended for developers who are migrating applications from classic Mac OS to Mac OS X. Carbon applications can run on Mac OS 9 as well as Mac OS X, making Carbon a logical choice for those developers whose applications need to run on both systems.

For cross-platform desktop application development, Apple supports two environments:

The principle cross-platform API on Mac OS X is Java 2, Standard Edition. Mac OS X version 10.4 "Tiger" provides both Java 1.3 and Java 1.4.2 integrated into the system. (Java 1.5 is also available as a developer download; see the ADC Java page for more information.) In addition, Apple provides the full JDK for both Java 1.3 and 1.4.2, as well as implementations of Java 3D and Java Advanced Imaging for JDK 1.4. Most existing Java applications run well on Mac OS X without any modification, but some developers like to take advantage of the unique integration that Apple provides with Java in Mac OS X to make the user experience close to that of a native Mac OS X application.

If you need for your application to run on Linux or a UNIX platform other than Mac OS X, you may wish to take advantage of Apple's highly-optimized X11 implementation. Apple provides a full X11 SDK as an optional install with the Xcode Tools. In addition to the X11 environment and X11 SDKs provided by Apple, there are several third-party technologies such as Trolltech Qt that are available for X11 development on Mac OS X. Apple's support for easy portability between UNIX variants isn't limited to X11. Mac OS X supports all of the mandatory POSIX APIs as well as providing a number of libraries common to System V UNIX, BSD and Linux so that building portable code is easy.

Server Application Development

Apple provides numerous tools and APIs for the development of server-based applications.

First, Apple provides support for the development and deployment of J2EE applications both using native Java APIs and using Apple's Java-based WebObjects frameworks. For conventional J2EE development with EJBs and servlets, Apple's Xcode Tools include templates for J2EE projects as well as a JBoss development server that can run your J2EE applications.

The WebObjects frameworks provide a set of advanced APIs similar to Apple's Cocoa environment, but implemented in pure Java such that applications developed with WebObjects can be deployed to standard J2EE application servers.

For building dynamic websites, you may want to consider developing scripted Web applications using PHP. Mac OS X comes with an Apache Web server and PHP already installed, and there are thousands of helpful resources available for PHP development ranging from sample applications to books and websites.

Developer Programs and Resources

Whatever development technologies you work with, an Apple Developer Connection membership is a critical resource. ADC offers a range of technical support, information, and service options for Mac OS X developers—from free online programs to full-featured programs that include discounts on Apple hardware for development and testing.

Conclusion

This document has outlined some of the key technologies that Apple provides for developing Mac OS X and cross-platform applications. Beyond what's built into Mac OS X, there are hundreds of commercial and Open Source development technologies available to address your needs. Regardless of whether you're building desktop or server applications, targeting a single platform or building software that runs on many platforms, Apple gives you the technology and know-how that you need to succeed.

Updated: 2005-04-29