Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC

Cocoa Overview

Cocoa is Apple's name for the collection of frameworks, APIs, and accompanying runtimes that make up the development layer of Mac OS X. By developing with the Cocoa frameworks you will be writing applications the same way that Mac OS X itself is written, with complete access to the full power of the operating system, including the signature Mac look and feel. Cocoa is simply the best way to create native Mac applications.

The Cocoa frameworks are primarily written in Objective-C, and support both 32-bit and 64-bit applications as well as Objective-C 2.0's garbage collection. The Cocoa frameworks are completely accessible to Objective-C programs, and can even be accessed using native syntax from AppleScript, Python, and Ruby. Example frameworks included within Cocoa are Foundation, which defines the "nuts and bolts" classes for Objective-C programming, and Application Kit, which includes higher-level controls such as windows, buttons, menus, and text fields. Cocoa also includes assistive technologies integrated into the frameworks, so you can bring your application to as broad an audience as possible. Whatever you need to create, Cocoa contains the frameworks to make development productive and enjoyable.

Cocoa makes strong and consistent use of the Model-View-Controller (MVC) design pattern, where models encapsulate application data, views display and edit that data, and controllers mediate between the two. MVC is pervasive throughout the Cocoa frameworks. By separating responsibilities in this manner, you end up with an application that is easier to design, implement, and maintain. Cocoa Bindings, which are available in Interface Builder, eliminate most of the glue code associated with an MVC implementation by transparently connecting controllers with models and views.

The frameworks and tools work together to help you bring your Cocoa user interface design to life. The Xcode Integrated Development Environment brings most of the tools that you use for day-to-day development into a single customizable interface, giving you easy access to all the Cocoa frameworks. Interface Builder is the easy-to-use graphical editor for designing and managing every aspect of Aqua-compliant graphical user interfaces. Changes you make in the interface are automatically synchronized with Xcode. Interface Builder also includes support for the Core Animation and Core Graphics frameworks, so you can drop-in animations and effects.

Cocoa includes numerous advanced, high-level frameworks that let you add cool features to your application. For example, with Core Image developers can easily create real-time capable image processing solutions that take full advantage of the latest hardware. Core Animation is a powerful graphics framework that lets you layer Core Image effects and combine media types, such as QuickTime, OpenGL, and Quartz Composer. Core Audio defines the software technologies at the heart of the user audio experience on Mac OS X, handling not only playback, but also the converting of audio data from one format to another, reading and writing audio data, and adding effects. And the Core Data framework allows you to build well-factored applications by providing a strong, flexible, and powerful data model framework.

The Cocoa environment is built on the solid foundation of Mac OS X, which combines a robust and open UNIX core with the richness and usability of the Macintosh interface. Under the hood Mac OS X integrates a number of UNIX technologies, including the Mach 3.0 microkernel, operating system services based on FreeBSD 5 UNIX, high-performance TCP/IP networking, and support for multiple file systems.

For news, updates and links to other ADC content related to Cocoa, return to the Cocoa topic page.

Updated: 2007-10-26