Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Cocoa

Cocoa

Ratings: (0)|Views: 16|Likes:
Published by parzpinku

More info:

Published by: parzpinku on Oct 26, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

10/26/2011

pdf

text

original

 
INTRODUCTION
Cocoa is an application environment for both the Mac OS X operating system andiPhone OS, the operating system used on multi-touch devices such as iPhone and iPod touch.It consists of a suite of object-oriented software libraries, a runtime, and an integrateddevelopment environment
The Cocoa Environment
Cocoa is a set of object-oriented frameworks that provides a runtime environment for applications running on Mac OS X and iPhone OS. It is also part of a developmentenvironment that helps you efficiently bring these applications from design stage todeployment. Cocoa is the preeminent application environment for Mac OS X and the onlyapplication environment for iPhone OS. (Carbon is an alternative environment on MacOS X, but it is a compatibility framework with procedural programmatic interface intended tosupport existing Mac OS X code bases.) Most of the applications you see on Mac OS X andiPhone OS, including Mail and Safari, are Cocoa applications. An integrated developmentenvironment called Xcode supports application development for both platforms. Thecombination of this development environment and Cocoa makes it easy to create a well-factored, full-featured application.
Introducing Cocoa
As with all application environments, Cocoa presents two faces; it has a runtime aspectand a development aspect. In its runtime aspect, Cocoa applications present the user inter face and are tightly integrated with the other visible portions of the operating system; on MacOS X, these include the Finder, the Dock, and other applications from all environments. Butit is the development aspect that is the more interesting one to programmers. Cocoa is anintegrated suite of object-oriented software components—classes—that enables you torapidly create robust, full-featured Mac OS X applications. These classes are reusable andadaptable software building blocks; you can use them as-is or extend them for your specificrequirements. Cocoa classes exist for just about every conceivable development necessity,from user-inter face objects to data formatting, and where a need hasn’t been anticipated, youcan easily create a subclass of an existing class that answers that need.
 
Cocoa history
 Cocoa is the continuation of several frameworks (primarily the
 App Kit 
and
 Foundation Kit 
) from the NeXTSTEP and OPENSTEP programming environments developed by NeXTin the 1980s and 1990s. Apple acquired NeXT in December 1996, and subsequently went towork on the Rhapsody operating system that was supposed to be the direct successor of OPENSTEP. It was to have had an emulation base for Mac OS applications, called
 Blue Box
.The OPENSTEP base of libraries and binary support was termed
Yellow Box
. Rhapsodyevolved into Mac OS X, and the Yellow Box became Cocoa. As a result, Cocoa classes beginwith the acronym "NS" (standing either for the NeXT-Sun creation of OPENSTEP, or for theoriginal proprietary term for the OPENSTEP framework, NeXTSTEP): NSString, NSArray,etc. Much of the work that went into developing OPENSTEP was applied to the developmentof Mac OS X, Cocoa being the most visible part. There are, however, some differences. For example, NeXTSTEP and OPENSTEP used Display PostScript for on-screen display of textand graphics, while Cocoa depends on Apple's Quartz (which uses the PDF imaging model).Cocoa also has a level of Internet support, including the NSURL and WebKit HTML classes,and others, while under OPENSTEP there was only rudimentary support for managednetwork connections through NSFileHandle classes and Berkeley sockets.Prior to its current use, the "Cocoa" trademark was the name of an application thatallowed children to create multimedia projects. It was originally known as KidSim, and isnow licensed to a third party and marketed as Stagecast Creator. The program wasdiscontinued in one of the rationalizations that followed Steve Jobs' return to Apple. Thename was re-used to avoid the delay while registering a new trademark, with Stagecastagreeing to market the older Cocoa under a new name.
 
How Cocoa Fits into Mac OS X
Figure1-1shows a simplified diagram of the Mac OS X system architecture.
Figure1-1 Mac OS X architecture—simplified perspective
This diagram is simple for a purpose: to depict unambiguously to those unfamiliar with MacOS X some of its major components and dependencies. But in its simplicity it omitsimportant details and blurs others. These details fill in an important part of the pictureshowing how Cocoa fits into the rest of Mac OS X.Figure 1-2 situates Cocoa more accurately in an architectural setting. This diagram showsMac OS X as a series of software layers going from the foundation of Darwin to the variousapplication environments; the intervening layers represent the system software contained inthe two major umbrella frameworks, Core Services and Application Services. The diagramsuggests that a component at one layer generally has dependencies on the layer beneath it.
Figure1-2 Cocoa in the architecture of Mac OSX

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->