There's a reason that a large slice of the open-source movement has defected from running Linux on its laptops to running Mac OS X. The reason is the Unix core that underlies Mac OS X, and the development tools that run on that core. Cocoa makes it easy to create very slick Mac OS X interfaces for software (as well as to create applications in a hurry), and this new edition of Cocoa Programming for Mac OS X does an excellent job of teaching its readers how to put a Cocoa face on top of code (Objective-C code almost exclusively). If you know something about C and/or C++ programming and want to apply your skills to the Mac, this is precisely the book you want.
Author Aaron Hillegass teaches a Cocoa class, and his book reads like a demonstration-driven lecture in a computer lab. That is, the book takes a heavily example-centric approach to its subject, beginning with simple announcement windows and proceeding to cover the more advanced controls and object-oriented features of Cocoa and Objective-C. Throughout, he hops back and forth between descriptions of the goal to be accomplished, listings of the code that does the job, and instructions on how to use the Mac OS X development tools to speed the development process. --David Wall
Topics covered: How to write software for Mac OS X in Objective-C and, especially, with Cocoa. The new edition shows how to use NSUndoManager, add AppleScript capability to an application, do graphics work with OpenGL, and use Cocoa under Linux using GNUstep. As well, all the basic controls and design patterns are covered.
From Book News, Inc.
Cocoa, the programming language used for Mac OS X, is taught through a step-by-step tutorial format in this practical and well-organized guide. Hillegass (a trainer and software engineer) is blessed with a writing style that novices will find encouraging in tone though rigorous in material. Applied exercises are given first, followed by the philosophy of the exercise, with each chapter building on earlier tools. The topics include Objective-C, controls, helper objects, archiving, Nib files and NSWindowController, user defaults, using notifications and alert panels, custom views, images and mouse events, responders and keyboard events, NSTimer, sheets, and creating interface builder palettes.Copyright © 2004 Book News, Inc., Portland, OR
Book Info
The most comprehensive guide to developing Cocoa available. For the developer new to Cocoa, it provides an excellent introduction that will lead to success with the world's best object-oriented development tools. Softcover.
From the Back Cover
The highly acclaimed introduction to Cocoa—recommended most by experienced Mac OS X developers now updated and expanded.
Here's what critics said about the first edition:
"Reading this book is the absolute best way to learn how to harness the power of this amazing technology."
—Andrew Stone, President, Stone Design, www.stone.com
"Make sure this is the first one you pick up. It's the best book for a beginning Cocoa programmer."
—From the review on HyperJeff.net&
"I love this book. The descriptions are clear, the examples logical. Everything a programmer needs to get up to speed on Cocoa."
—Dave Mark, Editor, MacTech Magazine
To help programmers develop applications for Mac OS X, Apple is now giving away XCode, Interface Builder, and the Cocoa frameworks—the tools used to create Safari, GarageBand, Mail, and the iApps. Cocoa® Programming for Mac® OS X, Second Edition, will give you a complete understanding of how to use these tremendously powerful tools and frameworks to write full-featured applications for the Mac.
Guiding programmers through the key features of Cocoa, this book emphasizes design patterns that enable you to predict the behavior of classes you have never used before. Written in a tutorial format, it takes you step-by-step through the creation of six applications and an Interface Builder palette. Each project introduces several new ideas, and as each concept or technique is discussed, the author, drawing on his own extensive experience, shows you the right way to use it.
Updated for Xcode and Mac OS X 10.3, new chapters in this second edition include coverage of OpenGL, AppleScriptability, the undo manager, creating frameworks, and a brief introduction to using GNUstep on Linux.
About the Author
Aaron Hillegass, who worked at NeXT and Apple, now teaches popular Cocoa programming classes at Big Nerd Ranch. At NeXT, he wrote the first course on OpenStep, the predecessor to today's Cocoa tools.This book is based on the Big Nerd Ranch course and is influenced by more than a decade of work with OpenStep and Cocoa.
Excerpt. © Reprinted by permission. All rights reserved.
Preface to the Second Edition
I once studied with a wise mathematician named Soo Bong Chae. Dr. Chae had written a few really good books, and one day he told me his secret: "After I write a book, I put it away for two years. After avoiding the book for two years, I read it and rewrite the parts that need work. Then I publish it." The idea was a good one: By ignoring the book for two years, he could revise it with fresh eyes.
But that's not what happened in my case.
It has, indeed, been two years since I wrote the first edition of Cocoa(R) Programming for Mac(R) OS X. In that time, however, I have taught 20 classes using the book as a text. Overall, the first edition was a good book, but it was far from perfect. Where the book was weak, I have suffered. It was with great relish I eliminated these sore spots from this edition.
During these two years, Apple has continued innovating upon the strong base that Mac OS X created. Hundreds of tiny improvements were made, and two large changes occurred: Project Builder was replaced by Xcode, and Cocoa bindings were added to Cocoa. Throughout this book, you will use Xcode, and Cocoa bindings are covered in Chapter 6.
Also, during these years, I continued my work as a programmer. As my clients asked for certain features to be added to their products, I came to realize that several topics needed to be addressed in a new edition the book. Besides many new "For the More Curious" sections, the second edition has five entirely new chapters: Chapter 7 describes how to add undo capabilities to an application using NSUndoManager. Chapter 28 demonstrates how to make an application AppleScript-able. Chapter 29 shows how you can use OpenGL calls within a Cocoa application. Chapter 30 gives the necessary steps to create a reusable framework. Chapter 31 will get you started creating Cocoa applications on Linux using GNUstep.
The final improvement is a physical one: The second edition has a lay-flat binding so that it can sit at your elbow as you work through the book. Although a subtle change, I think it will make your experience with the book and its ideas a little bit more pleasant.
I don't get to ignore this book after it has been published—the quality of the book has a direct influence on the quality of the courses I teach. Is it a good book? Let me put it this way: I am looking forward to going through it with my students a dozen times this year. I guess that says something.Preface to the First Edition
Cocoa is a powerful collection of tools and libraries that enable developers to write applications for Mac OS X. iPhoto, iChat, iCal, iSync and Safari were all written using Cocoa. Why Cocoa? Because it allows programmers to develop full-featured applications faster than ever before.
The increased speed does not, however, come for free. The new technologies have a steep learning curve. This book will guide you through the ideas and techniques that separate the great Cocoa programmers from the wanna-be's.
This book is written for programmers who already know some C programming and something about objects. The reader is not expected to have any experience with Mac programming. It is a hands-on book and assumes that the reader has access to Mac OS X and the developer tools. The developer tools are free. If you bought a shrink-wrapped copy of Mac OS X, the developer tools CD was in the box. The tools can also be downloaded from the Apple Developer Connection Web site (http://connect.apple.com/).
—Aaron Hillegass
0321213149P04152004
Cocoa Programming for Mac OS X FROM OUR EDITORS
The Barnes & Noble Review
Mac developers worldwide are oohing and aahing at Mac OS X and Aqua. Wouldn't it be so cool to be building OS X applications right now? To do it right, though, you've gotta bite the bullet. You need to master Apple's Cocoa framework, and (realistically) you should be working with Apple's language of choice, Objective-C.
While Objective-C isn't a big stretch for experienced C/C++ programmers, the Cocoa framework can be pretty challenging. That's where Aaron Hillegass comes in. His company, Big Nerd Ranch, is the world's leading independent Cocoa training firm. This guy goes back a long way with Steve Jobs: at NeXT, he wrote the first course on OpenStep, the development environment that led to Cocoa. He knows his stuff. His new book, Cocoa Programming for Mac OS X, is utterly authoritative.
It's full of real code, and answers to the questions Mac developers have been asking in Hillegass's seminars. Questions about Aqua interface development. Custom views. Pasteboards. Compilation. Debugging. Most of all, this book reflects a deep understanding of the powerful design patterns that underlie Cocoa. You've got to "think different" to program today's Macs. Nobody's more qualified to show you how.
(Bill Camarda)
Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced software, computing, and networking products and services. He served for nearly ten years as vice president of a New Jerseybased marketing company, where he supervised a wide range of graphics and web design projects. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.
FROM THE PUBLISHER
The practical guide everyone says you need!
"The most comprehensive guide to developing Cocoa available. For the developer new to Cocoa, it provides an excellent introduction that will lead to success with the world's best object-oriented development tools. For those familiar with Cocoa, the excellent organization and presentation make the book invaluable as a reference tool."
Bill Bumgarner, Cofounder, CodeFab
With the arrival of Mac OS X, Apple now has a modern operating system that calls for advanced programming capability. To take full advantage of the exciting and innovative features of OS X, Apple recommends a development framework known as Cocoa. Cocoa is a powerful collection of object-oriented tools and libraries that makes developing applications a much faster process. Mastery of Cocoa is absolutely essential for anyone doing serious development work for the Macintosh.
"Mac OS X and Cocoa are going to revolutionize the world of software development in the coming years... Aaron Hillegass's book is without a doubt the best aid to learning this technology."
Erik J. Barzeski, Editor, CocoaDevCentral.com
New technologies often have a steep learning curve and do not always come with complete instructions on how to get started or how to overcome common obstacles. Enter Cocoa® Programming for Mac® OS X, which shows you precisely how to put Cocoa to work.
"Reading this book is the absolute best way to learn how to harness the power of this amazing technology."
Andrew Stone, President, Stone Design.
Guiding programmers through the key features of Cocoa, this bookemphasizes design patterns that enable you to predict the behavior of classes you have never used before. Using a tutorial format, it takes you, step-by-step, through five applications and an InterfaceBuilder palette. Each project introduces several new ideas, and as each concept or technique is discussed, the author, drawing on his own extensive experience, shows you the advantages of working with Cocoa in object-oriented software development environments.
SYNOPSIS
Cocoa, the programming language used for Mac OS X, is taught through a step-by-step tutorial format in this practical and well-organized guide. Hillegass (a trainer and software engineer) is blessed with a writing style that novices will find encouraging in tone though rigorous in material. Applied exercises are given first, followed by the philosophy of the exercise, with each chapter building on earlier tools. The topics include Objective-C, controls, helper objects, archiving, Nib files and NSWindowController, user defaults, using notifications and alert panels, custom views, images and mouse events, responders and keyboard events, NSTimer, sheets, and creating interface builder palettes. Annotation c. Book News, Inc., Portland, OR (booknews.com)
FROM THE CRITICS
Slashdot.org
Five new chapters were added in this 2nd edition, which discuss creating AppleScriptable applications, integrating OpenGL, adding Undo abilities, creating reusable frameworks, and tinkering with GNUStep, the raw open-source tools for those curious about making Cocoa apps under Linux.
If you're a UNIX or Windows developer who picked up a Mac OS X machine recently in hopes of developing new apps or porting your apps to Mac users, this book should be strongly considered as one of your essential reference and training tomes.