Jump to ratings and reviews
Rate this book

Cocoa Design Patterns

Rate this book
Much of the technology embodied by Apple's Cocoa software development frameworks have been in commercial use since 1988, and in spite of many years of use, the Cocoa frameworks are still revolutionary. Cocoa technology has been marketed with a variety of names including NeXTstep, OpenStep*, Rhapsody, and Yellow Box. In recent years, Apple has expanded the frameworks dramatically and added new tools to raise the bar for Cocoa programmer productivity beyond its already famously high levels.

Programmers are often overwhelmed by the breadth and sophistication of Cocoa when they first start using the frameworks. Cocoa is huge, but it’s also elegant in its consistency and simplicity which result from the application of patterns throughout its design. Understanding the patterns enables the most effective use of the frameworks and serves as a guide for writing your own applications.

This book explains the object-oriented design patterns found in Apple’s Cocoa frameworks. Design patterns aren't unique to Cocoa; they're recognized in most reusable software libraries and available in any software development environment. Design patterns simply identify recurring software problems and best practices for solving them. The primary goal of this book is to supply insight into the design and rationale of Cocoa, but with that insight, you'll be able to effectively re-use the tried and true patterns in your own software - even if you aren't using Cocoa.

384 pages, Paperback

First published September 1, 2009

22 people are currently reading
99 people want to read

About the author

Erik M. Buck

3 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
48 (32%)
4 stars
63 (43%)
3 stars
25 (17%)
2 stars
9 (6%)
1 star
1 (<1%)
Displaying 1 - 7 of 7 reviews
Profile Image for Alex.
28 reviews9 followers
October 27, 2009
This book bills itself as a Cocoa-equivalent to the origin "Design Patterns" book. While you can read it that way, I found it most rewarding when looking for answers as to why things are the way they are in Cocoa. This was closer to what I was hoping for—less of a classic patterns book, more of a guide to Cocoa idioms and the rationale behind them.

My copy was completely dog-eared and full of notes in the two weeks it took me to read this. For an experienced developer coming to Cocoa or Cocoa Touch from other platforms, this is an essential guide to getting to the philosophy that underlies Objective-C and Cocoa.
25 reviews
August 5, 2016
Let me just start by saying that mine is an unfair rating for this book. The description is accurate and I couldn't fault the author's style or delivery. I also judge without finishing it, I stopped reading half way in.

However, "barely two starts worth" is how much value I've gotten from this book. An experienced developer just won't learn much by reading this book. It is a list of patterns that most of us have used before, with explanation and justification for each. The fact that they are found in Cocoa is entirely inconsequential.

Being able to attach a label to a pattern that you have used is useful for conversation. Reading about patterns, on the other hand, is a useless exercise that just wont make you a better developer.

From the (again to be fair, accurate) description "professionals will be able to effectively re-use the tried-and-true patterns in their own software." Professionals just do not need this book to re-use patterns and the fact that they are tried-and-true means that we have heard of them.

So while the book deserves a higher rating, I'd caution anybody against similar text. If you find the idea of this book appealing, go write some software instead.
Profile Image for Hots Hartley.
323 reviews13 followers
October 21, 2025
Fantastic book. This is the way I learned to program iPhone apps.

The problem with cookbooks and language references is their impracticality in the real world. This book avoids that problem by providing real examples of patterns you might use in a production app.

For example, you use a Singleton for a central database or user save data, because you want it to serve as the single ground truth for all queries across your app.

You use the Decorator pattern for ornaments on your keyboard when it comes up, adding buttons for Cancel and Confirm.

Likewise, many patterns have natural analogs in the world of Objective-C:
- The Flywheel pattern for collections generating cells upon themselves.
- The Delegate pattern for callbacks to parent ViewControllers when a child view needs info.
- The Composition pattern for building classes that contain encapsulated, archivable data like your custom strings, user profiles, and dictionary values.
- The Singleton pattern for central databases and save data.
- The Decorator pattern for keyboards, supplemental views, callouts, and toolbars.
- The Model-View-Controller pattern for storing data in models, UI in views, and response logic in controllers
- The Observer pattern for responding to backgrounding of the app, returning from background or sleep, hearing back from REST API servers
- The Dispatch pattern for performing UI work on the main thread, other work on other threads
Profile Image for Sebastian.
15 reviews13 followers
June 14, 2013
+ the big plus of this book is that it is the only book dedicated to design patterns in combination with mac programming. one would expect to find more books like that, given the fact that objective-c and cocoa are so "pattern-friendly" and "pattern-oriented". only when i came to objective-c and cocoa did i learn how to solve those design problems that have always haunted me in java and c++. what would feel awkward to program in other languages is the most natural thing in objective-c. i might now be able to transfer the way i program in objective-c to those other languages, knowing that it is not my design that is awkward but those other languages. the book solidified that eye-opening experience and is a way to learn about patterns even if you come from a different language and platform.

on the downside:
- the book is out of date and needs an updated edition. the code examples don't use ARC, which confines readability. ARC would simplify the code and help illustrating the patterns. also, some patterns are just programmed differently with arc.
- the book should go for Cocoa touch. one reason is that cocoa touch is more modern and simpler and lets the patterns stand out more.
- the structure of the book is not convincing. to me "solution" is not the proper follower on "motivation". also, the author tried to structure the text on each pattern in the same way to be consistent. but he does not manage to fill the structure properly. after reading some patterns you realise that the section titles are rather meaningless. It does not seem appropriate for a book on design patterns to be so poorly structured.
- the writing is average at best and far too redundant for my taste

well, this book is not suited to be read from start to finish. it has no overarching "story" to it and the writing is dry and redundant. it should be used as a reference.
855 reviews6 followers
August 16, 2011
An OK book for an experienced programmer to use.

Covers "design patterns". Explains some of the basics, as design patterns. Useful that way.

Consulted this book (after getting some experience) for the right way to do a "model" object, initialization, etc.
7 reviews
December 28, 2011
A decent book for a handful of high-level patterns, but the first 1/2 of the book seems rather useless to my eyes.
Displaying 1 - 7 of 7 reviews

Can't find what you're looking for?

Get help and learn more about the design.