Download PDF version of this article PDF

Cocoa in a Nutshell
Michael Beam and James Duncan Davidson
O’Reilly & Associates, 2003, $39.95
ISBN: 0-596-00462-1

Like other O’Reilly Nutshell books, this is not the first stop on the journey of learning the topic in question. Also like the other Nutshell books, it is the definitive reference for the topic that it covers. With over 240 classes, Cocoa is a complete class library, framework, and development environment for Apple’s revolutionary Mac OS X. When faced with problems such as stopping coding, going into the documentation, or digging around to find the class documentation I need, there is just something magical about being able to flip through a book to find solutions.

The book is divided into two parts. The first half presents an overview of Cocoa’s classes and an Objective-C overview for developers new to the language. The classes are grouped into chapters: “Foundation,” “The Application Kit (AppKit),” “Drawing and Imaging,” “Text Handling,” “Networking,” “Interapplication Communication,” and “Other Frameworks.” This organization can be quite useful, though the order of the topics is not particularly conducive to learning.

If you want the encyclopedic reference to Cocoa, you’ll enjoy the second half of the book, which is the application programming interface (API) “Quick Reference.” The entries in this section are divided into “Foundation Types and Constants,” “Foundation Functions,” “Application Kit Types and Constants,” “Application Kit Functions,” “Foundation Classes,” “Foundation Protocols,” “Application Kit Classes,” and “Application Kit Protocols.” Chapters 13 and 15 cover the Foundation and AppKit classes, and chapters 14 and 16 contain alphabetically arranged quick-reference entries for the protocols of the frameworks. Finally, the “Method Index” at the end of the book has an alphabetical listing of every method in Foundation and AppKit, along with a list of classes that implement each method.

Each entry in the API reference includes a description of the class or protocol, a figure displaying the inheritance and protocol adoption hierarchy for the class, the operating system version the class was implemented in, and a functionally grouped synopsis of the methods that are part of the class interface or protocol.

The book concludes with an appendix on resources for Cocoa developers. It is surprisingly useful to have information on Apple documentation, third-party books and Web sites, mailing lists, and partnership programs in one place.

The only downside to the book is that it was released right before Apple showcased Mac OS X 10.3, “Panther,” which has plenty of new classes and class methods. Given the rapid pace of development for Mac OS X and the secretive nature of Apple’s development activities, it seems that the documentation will always be a step or two behind the language. Still, this book would be a great addition to any Macintosh programmer’s bookshelf.—William Stevenson

The Bug
Ellen Ullman
Nan A. Talese/Doubleday, 2003, $23.95
ISBN: 0-385-50860-3

This novel is about a programmer who is involved in testing a software company’s database management product. A program bug is detected by various people in the organization. Its appearance is random, so it is called “Jester.” The hero attempts to eradicate this bug. It contains a software game called “Life” that was originally developed by the mathematician Horon Canway. In the novel, however, it is the main character who has developed the program, which is always running.

The novel is divided into four confusing parts. Because of the large number of characters and first-person narration, the reader may find it difficult to identify who is telling the story from chapter to chapter.

Although the description of the Life game is interesting, serious readers might want to bypass this novel altogether.—V B Kaujalgi

Reprinted from Computing Reviews, © 2003 ACM, http://www.reviews.com.

acmqueue

Originally published in Queue vol. 1, no. 8
Comment on this article in the ACM Digital Library








© ACM, Inc. All Rights Reserved.