OS X has a layered architecture with key technologies belonging to each layer; this article focuses on the Cocoa (Application) layer, its importance, special features, architecture in OS X, and frameworks.
[1]Cocoa is an application environment most specific to Mac OS X, as Cocoa-based applications run
only on Mac OS X. Cocoa is based on the Object-C object-oriented programming language. Often,
developers must use the Cocoa environment if they want to take advantage of 64-bit services. For this
reason, most of the built-in system software and new third-party software is developed for the Cocoa
environment (White 334); Cocoa’s high-level [2]APIs make it easy to add animation, networking, and
the native platform appearance and behavior to your application with only a few lines of code.
only on Mac OS X. Cocoa is based on the Object-C object-oriented programming language. Often,
developers must use the Cocoa environment if they want to take advantage of 64-bit services. For this
reason, most of the built-in system software and new third-party software is developed for the Cocoa
environment (White 334); Cocoa’s high-level [2]APIs make it easy to add animation, networking, and
the native platform appearance and behavior to your application with only a few lines of code.
iOS, including Mail and Safari, are Cocoa applications. An integrated development environment
development environment and Cocoa makes it easy to create a well-factored, full-
featured application (What is Cocoa, Web). "As with all application environments, Cocoa presents
two faces; it has a runtime aspect and a development aspect…. the development aspect … is the more
interesting one to programmers.
Cocoa’s integrated suite of object-oriented software components -- classes -- enables you to
rapidly create robust, full-featured OS X and iOS applications. These classes are reusable and
adaptable software building blocks; you can use them as-is or extend them for your specific
requirements. Cocoa classes exist for just about every conceivable development necessity, from user-
interface objects to data formatting. Where a development need hasn't been anticipated, you can
easily create a subclass of an existing class that answers that need" (What is Cocoa, Web).
Fig. 1 Cocoa Application Layer |
Fig.1 Framework illustration (Cocoa Application layer, Web)
According to (OS X Cocoa, web), Cocoa includes primary
frameworks such as [5]AppKit and Core- Foundation that
provide common building blocks for all Mac applications,
as well as specialized frameworks for everything from
networking and data to graphics and professional audio processing. These frameworks range from
high-level Objective-C APIs that can create amazing effects in a few lines of code, down to low-level
frameworks to manipulate every aspect of the core system. Here is a small sampling of available
frameworks provided by Cocoa:
OS X delivers a rich audio and video experience through a comprehensive set of system-level
frameworks and technologies. Powerful APIs that streamline your development process make it easy
to incorporate professional-grade audio, music, media, and video functionality into your application.
frameworks and technologies. Powerful APIs that streamline your development process make it easy
to incorporate professional-grade audio, music, media, and video functionality into your application.
“Architecturally, OS X is a series of software layers going from the foundation of Darwin to the
various application frameworks and the user experience they support. The intervening layers
represent the system software largely (but not entirely) contained in the two major umbrella
frameworks, Core Services and Application Services. A component at one layer generally has
dependencies on the layer beneath it. Figure 2 below, situates Cocoa in this architectural setting.
Figure 2. Cocoa in the architecture of OS X |
Quartz (implemented in the Core Graphics framework), is part of the Application Services layer. And
at the base of the architectural stack is Darwin; everything in OS X, including Cocoa, ultimately
depends on Darwin to function” (What is Cocoa, web).
Based on the aforementioned (Cocoa’s (Application) layer, its importance, special features, architecture in OS X, and frameworks), Cocoa’s attractiveness to third-party app developers is apparent: the advantage of 64-bit services; its high-level Application Program Interface (API); its integrated development aspect called Xcode and its development aspect is the reason why most software --- built-in and third-party --- are developed for the Cocoa environment.
References
White, Kevin M. Mac OS X Support Essentials v10.6 California: Peachpit Press, 2010. Print.
What is Cocoa? http://developer.apple.com/library/mac/documentation/cocoa/conceptual/cocoafundamentals/index.html
Cocoa Application Layer http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/OSX_Technology_Overview/CocoaApplicationLayer/CocoaApplicationLayer.html
[1] From its introduction as NeXTSTEP in 1989 to the present day, it has been continually refined and tested… The Cocoa frameworks consist of libraries, APIs, and runtimes that form the development layer for all of Mac OS X. Your application will automatically inherit the great
behaviors and appearances of Mac OS X, with full access to the underlying power of the UNIX operating system. https://developer.apple.com/technologies/mac/cocoa.html
[2] API, an abbreviation of application program interface, is a set of routines, protocols, and tools for building software applications. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together. http://www.webopedia.com/TERM/A/API.html
[3] iOS is the operating system that runs on iPhone, iPod touch, and iPad devices. The operating system manages the device hardware and provides the technologies required to implement native apps. http://developer.apple.com/library/ios/#documentation/miscellaneous/conceptual/iphoneostechoverview/Introduction/Introduction.html
[4] The Xcode developer tools package provides everything you need to create great applications for Mac, iPhone, and iPad. https://developer.apple.com/technologies/tools/
[5] “AppKit, one of the application frameworks, provides the objects an application displays in its user interface and defines the structure for application behavior, including event handling and drawing. This is the only framework of the three that is actually in the Cocoa layer” (What is Cocoa, Web).
“AppKit is the key framework for Cocoa apps. The classes in the AppKit framework implement the user interface (UI) of an app, including windows, dialogs, controls, menus, and event handling. They also handle much of the behavior required of a well-behaved app, including menu management, window management, document management, Open and Save dialogs, and pasteboard (Clipboard) behavior.
In addition to having classes for windows, menus, event handling, and a wide variety of views and controls, AppKit has window- and data-controller classes and classes for fonts, colors, images, and graphics operations. A large subset of classes comprises the Cocoa text system, described in “Text, Typography, and Fonts.” Other AppKit classes support document management, printing, and services such as spellchecking, help, speech, and pasteboard and drag-and-drop operations” (Cocoa Application layer, Web).
No comments:
Post a Comment