Cocoa Design Patterns Book Review
|This is one very cool book. If you want to get to know Cocoa from the inside out, this is the book to pickup.|
The authors start out with a great introduction to MVC in Part I of the book. In the second chapter the author builds an application with a non-MVC design and then refactors it to an MVC application. He does a great job of showing advantages of using MVC.
The next three parts of the book are the patterns catalogs. The first covers fundamental patterns, the second covers patterns that help with decoupling, and the third covers patterns that help to hide complexity.
The last part of the book covers Core Data, the Application Kit, and Binding and Controls. The chapters on Core Data and the Application Kit both contain really nice diagrams of the key design patterns used to implement them and where to find their coverage in the book.
I have listed each part and the chapters included in each below.
Part I- One Pattern to Rule Them All
Ch. 1. Model View Controller
Ch. 2. MVC Analyzed and Applied
Part II- Fundamental Patterns
Ch. 3. Two-Stage Creation
Ch. 4. Template Method
Ch. 5. Dynamic Creation
Ch. 6. Category
Ch. 7. Anonymous Type and Heterogeneous Containers
Ch. 8. Enumerators
Ch. 9. Perform Selector and Delayed Perform
Ch. 10. Accessors
Ch. 11. Archiving and Unarchiving
Ch. 12. Copying
Part III- Patterns That Primarily Empower by Decoupling
Ch. 13. Singleton
Ch. 14. Notifications
Ch. 15. Delegates
Ch. 16. Hierarchies
Ch. 17. Outlets, Targets, and Actions
Ch. 18. Responder Chain
Ch. 19. Associative Storage
Ch. 20. Invocations
Ch. 21. Prototype
Ch. 22. Flyweight
Ch. 23. Decorators
Part IV- Patterns That Primarily Hide Complexity
Ch. 24. Bundles
Ch. 25. Class Clusters
Ch. 26. Façade
Ch. 27. Proxies and Forwarding
Ch. 28. Managers
Ch. 29. Controllers
Part V- Practical Tools for Pattern Application
Ch. 30. Core Data Models
Ch. 31. Application Kit Views
Ch. 32. Bindings and Controllers
The thing I like most about this book is the insight it provides into the Cocoa framework. Every pattern includes four sections, Motivation, Solution, Examples in Cocoa, and Consequences. The Examples in Cocoa section does an excellent job of showing how great Cocoa is designed.
The authors do a great job of making use of UML, screenshots, and other diagrams to bring a visual representation to the topic at hand.
Another thing the authors did well was providing links to addition information in the Apple Developer Documentation. This comes in handy if the authors include a topic you aren't up to speed on.
All the code is available for download. It is very well organized and usable. The projects need updated when they are opened, but I didn't run into any that didn't work.
I have always found that the best way to learn to use a language to its fullest potential is through a well-written design patterns book. This one is one of the best I have read. I will be keeping it by my side.
All in all, if you are an iOS or OS X developer you should read this book cover to cover and then keep it close for reference. This is a must read!!!
Cocoa Design Patterns