Cocoa is one of the
application environments available for
developers on
Mac OS X, the others being
Classic,
Carbon,
BSD/
POSIX, and pure
Java.
Based on NeXTStep, Cocoa is an elegant set of object-oriented APIs and runtime libraries and
frameworks that is very quick and easy to develop
for. You can see its ancestry in the names of the objects which all begin with NS, for NeXTStep.
Apps may be written in Objective-C or Java, and can take advantage of a
large number of objects in the low level Core Foundation and high level AppKit frameworks. These
provide opaque objects such as NSStrings which hold localizable Unicode strings and NSDictionarys which hold key-value
pairs. There is built-in functionality for
everything from PDF rendering to spellchecking and HTTP handling. Inter-process communication is
very easy, and with distributed objects, applications may transparently load
objects from other apps: yes, you can use any Cocoa app as a runtime library.
Creating GUIs for Cocoa apps is laughably easy. They are made using
Apple's free Interface Builder tool. This allows developers to create their interface by dragging
and dropping widgets and other Aqua interface elements such as tabbed panes, sheets and drawers, which are
then stored as XML nib files. All the
boring GUI stuff like tracking click events is handled transparently. This means
that there is no code used in the creation of a Cocoa app's GUI. You can actually open and edit the nib files
of an application and completely redesign the interface, without recompiling. This, combined with the publicly
accessible interfaces to Cocoa objects means that you could almost say that all Cocoa apps are open source.
Ok, a slight exaggeration, but you can easily customise or borrow functionality from commercial apps.
The GNUStep project aims produce a Cocoa-compatible Objective-C environment for other OSs.