|
|
Getting Started with CocoaTechnology OverviewCocoa helps you create commercial-grade applications quickly and efficiently. It is an advanced, mature object-oriented development environment that enables you to create complex software with surprisingly few lines of code. Through a seamless integration of tools and Cocoa API, the design and construction of a user interface is largely a matter of dragging windows, buttons, and other objects from palettes, initializing their attributes, and connecting them to other objects. Cocoa also defines a model for applications and implements most aspects of application behavior; you simply fit into this model the code that makes your application unique. The programmatic interfaces of the core Cocoa frameworks, Foundation and Application Kit, simplify access to most of the technologies on which Mac OS X is based, such as Quartz, Bonjour networking, and the printing system. These interfaces are in both Objective-C and Java. However, you can integrate code written in other languages into your Cocoa projects, including C++ code and C code. Because Objective-C is a superset of ANSI C, Carbon and other C APIs are compatible with Objective-C. If you haven’t already done so, read the ADC topic page for Cocoa.Note: Cocoa-Java is a learning environment for developers familiar with the Java language. It is not recommended for production work. The Cocoa-Java API is no longer maintained in parallel with the Objective-C API as the latter evolves. Start HereYou should first have a working knowledge of the C language and you should be familiar with basic programming constructs. Then, before you write a line of code, become familiar with the Cocoa environment by reading:
If you have the time, read all of Cocoa Fundamentals Guide for an orientation to Cocoa software development, including the basic concepts, terminology, design patterns, and architectures. Choose a Learning PathBecoming a productive Cocoa programmer begins with becoming familiar with the languages, tools, and programming interfaces. After that, you might want to integrate an existing code base into a Cocoa application. Learning Object-Oriented ProgrammingThe first step toward Cocoa development is learning the concepts of object-oriented programming and Objective-C, the simple yet powerful object-oriented programming language in which Cocoa is implemented:
Learning About the Development ToolsIf you want to find out what the development cycle is like and how the tools work together, read Xcode Quick Tour Guide. Xcode is the name of both Apple’s integrated development environment and the application used for managing, building, and debugging projects. Also take a look at Mac OS X Technology Overview to learn more about the development tools that you use to create, build, debug, and fine-tune Cocoa programs. If you want to know more about constructing user interfaces, read Interface Builder. The online help for the Interface Builder application also contains helpful information. Learning About the Cocoa APIThe core frameworks of Cocoa, Foundation and Application Kit, consist of hundreds of classes and thousands of methods in two languages, Objective-C and Java. To make this large API more approachable, Apple provides dozens of programming guides, overviews, and other documents. Beginning Cocoa programmers will want to read some of the following recommended documents:
Learning How to Port and Integrate CodeIf you have existing code written for Carbon, UNIX, or another platform, you can often integrate much of that code base into a Cocoa application. Read the following information for guidance on porting and integrating your existing code:
Next StepsThe Cocoa Reference Library includes the following high-level resource pages, which you can bookmark for easy access:
|
Last updated: 2006-10-03
|