Less than a month ago, the book publishers Addison Wesley released “Cocoa Programming for MacOSX,” which covers the MacOSX RAD development tools, Objective-C and the Cocoa API in easy-to-follow lessons. Update: The author of the book was kind to direct us to the place where you can actually download the source code discussed in the book! Thanks Aaron.The author of the book, Aaron Hillegass, is a teacher at the Big Nerd Ranch, where he gives instruction in Cocoa programming. Hillengass wrote the book based on his teaching experiences so, not surprisingly, the chapters feel like individual class sessions. An alternative title might be, “Learn Cocoa in 21 days,” but in a good way.
The book begins with the story of NeXTSTEP, a name that appears many times throughout the book, as the author used to work for NeXT back in its heyday. The first three pages outline how MacOSX came to life, like a Phoenix from the ashes of NeXTSTEP, and we get to understand better what Cocoa really is.
The third chapter may be one of the most important in the whole book, as it introduces the C programmer to Objective C. According to Hillegass, if you already know OOP programming with C or C++, Objective-C will only take you two hours in an afternoon to learn it. The book is not for newbies, but it is targeting people who already know OOP, C programming, programmers that come from Windows, NeXT or older versions of MacOS.
Being a NeXT employee, Hillegass is giving quite a lot of ground to the Application Kit of MacOSX, Archiving, Helper Objects, Localization, Preferences, etc. The book has many (and I mean, many) screenshots of the Interface & Project Builder (the MacOSX RAD tools) illustrating every major step or topic discussed in the pages. It truly feels that you are in a school class and Mr. Hillegass is
teaching a chapter a day, with the use of a big projection panel showing the development steps “live.”
The book encourages Cocoa programming only with Objective-C, C or C++ and it recommends avoiding Java. However, it does feature a small chapter about how to get started with Java & Cocoa.
Some of the best aspects of the book are the real life examples the author is using to explain certain concepts like object orientation (he uses RoboCop and Knight Rider as examples).
One disappointment of the book is that it does not include a CD with the source code discussed in the book, and it does not even offer the source as a download from the web. It would certainly make the life easier for people who try to learn from home. Update: Look the update above. The source code is available.
Another oversight is limited mention of how to debug your applications if you get errors or nasty bugs. There is only a 3-page mention of the GDB, including the two screenshots of the debugger, which take more than half of a page each.
In conclusion, the book is a great addition and probably a must-have for the new Cocoa programmer. But it is not enough to be used alone. “Learning Cocoa” from O’Reilly covers the Cocoa API more thoroughly, while “Cocoa Programming for MacOSX” will help you utilize the API with easy steps and visual examples for reference. These two books go together; one is a supplement to the other and any new MacOSX programmer should have both.
Overall: 8.5/10
Buy “Cocoa Programming for Mac OS X“ at Amazon.com for less |
Ignoring the differences in the language (C++ vs. O-C), just concentrate on the API’s.
(The fact that one uses Object->Method, and the other uses <insert O-C version here> is irrelevant.) Can someone post/point me at some source of simple Cocoa apps (just ‘GUI/hello world stuff like – creates a Window, add a label & a button, with action listener (or equivalent)).
mlk
Should think before I post
/me hides away in the direction of the downloadable source code…
XApplication, XWindow, XView, XControl, XTextView, XFont…
The object hierarchies of Cocoa and BeOS look very similar.
Both frameworks are really clean and elegant but Cocoa’s API seem
fairly superior regarding the support for localization and text
encodings and the table widget.
AppSketcher for BeOS was never released while InterfaceBuilder
is really a great tool for rapid protoyping and GUI design.
Are you sure this book isn’t better than “Learning Cocoa”? You did say, specifically, that Learning Cocoa covered more of the API. But I think this book is a world more cohesive. Learning Cocoa is really just a collection of disjointed web tutorials compiled into a book, and updated slightly (but not terribly thoroughly) for OS X. Having read most of Learning Cocoa and the first 5 chapters of Cocoa Programming for Mac OS X, I can already tell that this is a much better book. And I trust the source more than the guys at Apple, who really just did a recycling job. After all, Mr. Hillegrass taught many of them how to do it, or so I have heard.
It will be nice once Apple completes their documentation of Cocoa, and then finally releases a “Cocoa in a NutShell”-like book.
For another Cocoa programming resource, check out Vermont Recipes at http://www.stepwise.com/VermontRecipes/
Here is the real link:
http://www.stepwise.com/Articles/VermontRecipes/index.html“>Ver…
>Are you sure this book isn’t better than “Learning Cocoa”?
I NEVER said that “Learning Cocoa” is better or worse than “Cocoa Programming for MacOSX”. What I said, is that both books need each other (one book is a good reference for the API and the other is a good utilization to learn that API – they are different). In fact, I am going to host a review for both the “Learning Cocoa” & “Learning Carbon” books soon and I will rate them in that article, not in the present one.
There was a review of both books a while ago on Slashdot and “Cocoa Programming for MacOS X” was the clear winner there. I don’t own any of those books, but from flipping pages in bookstores I also had the impression as if “Learnign Cocoa” was not much more than the documentation Apple made available for free online.
I’ve read both books in my free time quest to learn how to program my mac without using Java. I’ve been impressed with Cocoa, and had been very pleased with “Learning Cocoa”. Since that was the one source out there, I guess I didn’t have a choice originally. There is a lot of overlap between that book and the free documentation from Apple, but it isn’t a one for one copy of the free stuff. I thought it was worth my $20 or $30.
A couple of weeks ago I picked up “Cocoa Programming for Mac OS X”. I’ve found that book much more effective in my training. That may be because I have an introduction to Cocoa already however. If I had to recommend one or the other, I think I would recommond “Cocoa Programming…” I just think it reads better.
All we need now is a book that highlights a lot more of the “hidden” Quartz functions and the like that Apple doesn’t want to share.