You are on page 1of 9

www.studymafia.

com
Seminar On
Cocoa - an application environment for Mac OS X and iPhone OS
Submitted To:
www.studymafia.com

Submitted By:
www.studymafia.com

Introduction
Cocoa is an application environment for both the Mac OS X operating system and iPhone 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 integrated development 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 development environment that helps you efficiently bring these applications from design stage to deployment. Cocoa is the preeminent application environment for Mac OS X and the only application environment for iPhone OS. (Carbon is an alternative environment on Mac OS X, but it is a compatibility framework with procedural programmatic interface intended to support existing Mac OS X code bases.) Most of the applications you see on Mac OS X and iPhone OS, including Mail and Safari, are Cocoa applications.

Introduction

Introducing Cocoa
As with all application environments, Cocoa presents two faces; it has a runtime aspect and 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 Mac OS X, these include the Finder, the Dock, and other applications from all environments. But it is the development aspect that is the more interesting one to programmers. Cocoa is an integrated suite of object-oriented software componentsclassesthat enables you to rapidly create robust, full-featured Mac OS X 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-inter face objects to data formatting, and where a need hasnt been anticipated, you can 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 NeXT in the 1980s and 1990s. Apple acquired NeXT in December 1996, and subsequently went to work 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. Rhapsody evolved into Mac OS X, and the Yellow Box became Cocoa. As a result, Cocoa classes begin with the acronym "NS" (standing either for the NeXT-Sun creation of OPENSTEP, or for the original proprietary term for the OPENSTEP framework, NeXTSTEP): NSString, NSArray, etc.

Features of a Cocoa Application


It is possible to create a Cocoa application without adding a single line of code. Make a new Cocoa application project using Xcode and then build the project. Thats it. Of course, this application wont do much, or at least much thats interesting. But this extremely simple application still launches when double-clicked, displays its icon in the Dock, displays its main menu and window (entitled Window), hides itself on command, behaves nicely with other running applications, and quits on command. You can move, resize, minimize, and close the window. You can even print the emptiness contained by the window.

COCOA DESIGN PATTERNS


What Is a Design Pattern? A design pattern is a template for a design that solves a general, recurring problem in a particular context. It is a tool of abstraction that is useful in fields like architecture and engineering as well as software development. The following sections summarize what design patterns are, explains why theyre important for object-oriented design, and looks at a sample design pattern.

CONCLUSION
Cocoa is one of Apple Inc.'s native object-oriented application program environments for the Mac OS X operating system. It is one of five major APIs available for Mac OS X; the others are Carbon, POSIX (for the BSD environment), X11 and Java. Cocoa applications are typically developed using the development tools provided by Apple, specifically Xcode (formerly Project Builder) and Interface Builder, using the Objective-C language. However, the Cocoaprogramming environment can be accessed using other tools, such as Object Pascal, Python, Perl and Ruby, with the aid of bridging mechanisms such as PasCocoa, PyObjC, CamelBones and RubyCocoa, respectively. Also, under development by Apple, is an implementation of the Ruby language, called MacRuby, which does away with the requirement for a bridging mechanism. It is also possible to write Objective-C Cocoa programs in a simple text editor and build it manually with GCC or GNUstep's makefile scripts.

You might also like