Cocoa (API)

From Citizendium
Jump to: navigation, search
This article is a stub and thus not approved.
Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
 
This editable Main Article is under development and subject to a disclaimer.

Cocoa is Apple's collection of object-orientated frameworks, APIs, and runtimes which make up the development layer of Mac OS X.[1] The Cocoa frameworks are written in the Objective-C programming language.

Most of Mac OS X itself is developed using Cocoa, and Apple encourages developers to use Cocoa for the development of all applications for OS X.

Cocoa is based on several frameworks from the NeXTSTEP and OpenStep environments, developed by NeXT prior to its acquisition by Apple. For this reason Cocoa classes have the prefix NS, for NeXTSTEP.


Frameworks

Classes in Cocoa are divided into groups called frameworks. As well as a compiled binary containing the framework's methods, a Cocoa framework also contains header files.
The main frameworks in Cocoa are the Foundation Kit and the Application Kit.

Foundation Kit
The Foundation Kit, or Foundation, is a generic framework providing basic classes and functions which are necessary for all software, but are not part of the user interface. Foundation was originally part of OpenStep, and in Mac OS X it is built on top of on the low-level Core Foundation API. Many Foundation data types are "toll-free bridged", and thus interchangeable, with their Core Foundation equivalents.
Application Kit
The Application Kit, or AppKit, contains classes and functions which relate to GUI interaction. AppKit is built on top of Foundation.

References

  1. Cocoa Overview on Apple Developer Connection