Cocoa
eBook - ePub

Cocoa

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

About this book

Develop applications for Mac OS X with this Developer Reference guide

Make a clean transition to programming in Apple environments using the elegant and dynamic programming API Cocoa and this practical guide. Written by aseasoned Mac expert, this book shows you how to write programs in Cocoa for the rapidly expanding world of Macintosh users.

Part of the Developer Reference series, this book prepares you for a productive programming experience on today's fastest-growing platform.

  • Cocoa is a programming framework for developing in Apple environments, including Mac OS X 10.6 Snow Leopard
  • This book covers all the major information you need to start developing dynamic applications for Mac OS X
  • Master all Cocoa tools, including Xcode and working with Objective-C
  • Includes full coverage of the Cocoa API, Xcode, and Objective-C, as well as programming for Apple's latest OS X, Snow Leopard
  • Companion Web site includes all code files

Programming for Apple's Macintosh is a growing career field. This essential guide, one of the most comprehensive on Cocoa, will help you quickly become productive.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Cocoa by Richard Wentk in PDF and/or ePUB format, as well as other popular books in Computer Science & Operating Systems. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Wiley
Year
2010
Print ISBN
9780470495896
eBook ISBN
9781118003930
mac_po1.eps
co_bar.eps
Part I: Getting Started
mac_po1.eps
In This Part
Chapter 1
Introducing Cocoa
Chapter 2
Think Cocoa!
Chapter 3
Introducing the Cocoa and OS Documentation
Chapter 4
Getting Started with Xcode
Chapter 5
Introducing Classes and Objects in Objective-C
Chapter 6
Getting Started With Classes and Messages in Application Design
Chapter 7
Introducing Interface Builder
Chapter 8
Building an Application with Interface Builder
mac_ch1.eps
co_bar.eps
Chapter 1: Introducing Cocoa
mac_chbox1.eps
In This Chapter
Introducing Cocoa
Understanding Cocoa's history
Profiting from Cocoa
Introducing Xcode and the Apple developer programs
Apple's Cocoa technology is one of computing's success stories. When OS X 10.0 was released in 2001, it immediately revolutionized the look and feel of desktop applications. Since then, other operating systems have borrowed freely from Cocoa's innovations. Apple has continued to innovate with the iPhone and iPad, introducing Cocoa Touch for mobile devices. Cocoa Touch offers a simplified and more tactile user experience, and is the first popular and successful attempt to move beyond a traditional window, mouse, and menu interface. Future versions of Cocoa on the Mac are likely to blend the iPhone's tactile technology with the sophisticated data handling, 64-bit memory management, and rich user interface options that are already available to Cocoa developers. Cocoa is widely used in Apple's own projects, and it determines the look and feel of an application such as Aperture, shown in Figure 1.1.
Introducing Cocoa
Cocoa is the collection of libraries and design principles used to build skeleton Mac applications, create and display a user interface, and manage data. Cocoa is also a design philosophy based on unique ideas about application design and development that you can find throughout the rest of this book. You don't need to understand Cocoa's history to use the Cocoa libraries, but their features may be easier to work with if you do.
Understanding Cocoa's history
Cocoa's origins can be traced to the mid-1970s and are closely tied to the history of the Objective-C programming language. Cocoa and Objective-C are used at different levels. Cocoa is a code library and a set of interface and development guidelines. Objective-C is the language that implements them.
Cocoa is now available for other languages, including JavaScript, Python, and Ruby on Rails, but most Cocoa developers continue to work in Objective-C because its syntax and features are a natural fit for Cocoa projects.
Figure 1.1
Apple's Aperture application uses Cocoa technology and follows Apple's user interface design guidelines. Although Cocoa objects implement the interface, they don't enforce a standard look and feel.
495896-fg0101.tif
Objective-C, developed by Brad Cox and Tom Love when they worked at ITT Corporation in the early 1980s, began as a mix of C and features copied from the Smalltalk experimental language. Smalltalk had been created — originally as a bet — by Alan Kay at the Xerox Palo Alto Research Center (PARC). PARC's famous graphical user interface (GUI) experiments inspired much of the visual design of both Mac OS and Windows. Smalltalk influenced those experiments by implementing a development environment in which independent objects communicated by sending and receiving messages.
At a time when most software was still procedural — it started at the beginning of a computer run and continued to the end, with occasional branches and subroutine calls — Smalltalk's model suggested a new and less rigid approach to software development. It enabled programmers to build applications from a library of “copy-able” but distinct interactive parts, connected by a messaging system that made the parts responsive and controllable.
A windowed GUI is difficult to manage in a procedural environment. In a Smalltalk environment, windows and icons become objects with properties — size, position, graphic contents, and so on — that can be remotely controlled by messages. When a window receives a message, it not only stores the value, but also it can automatically redraw itself. Messaging makes it possible for objects to control each o...

Table of contents

  1. Cover
  2. Table of Contents
  3. Title Page
  4. Foreword
  5. Part I: Getting Started
  6. Part II: Going Deeper
  7. Part III: Expanding the Possibilities
  8. Part IV: Appendixes