With the release of MacOSX, Apple has engineered and released two new APIs: Carbon & Cocoa. Carbon is similar to MacOS 9 API and it can be programmed in C & C++. Carbon was created in order to give Macintosh developers an easy-to-walk “bridge” to easily port their MacOS applications to OSX. Through the CarbonLib, developers can now develop both MacOSX and MacOS9 applications with a single effort. Cocoa is the fully native MacOSX API; it gives access to more MacOSX-specific features and it can be programmed with Objective-C or Java. Apple, through O’Reilly, last year released two books, “Learning Carbon” and “Learning Cocoa“.Both books have been written by several “Apple Developer Connection” tech writters and it … shows. At places, both of the books seem disjoined and manifest different writing styles throughout the books. However, if you are after just a reference rather than … a piece of literature, then you probably won’t mind it.
Both books are a good introduction and they do describe the basics that could get an experienced programmer going. I can’t say that both books are written for absolute beginners, though. Exactly because of the disjoined nature of the book, it seems probable that lots of people “won’t get it” immediately.
While Carbon supports C++, the book “Learning Carbon” does not make use of the popular language, but instead all the samples are written in plain C. On the other hand, a large part of the Cocoa book is about introducing Project Builder (RAD tool), but a fair amount of Objective-C is there as well. Surprisingly, Java-Cocoa programming is not even mentioned to the Cocoa book!
Carbon has some good examples on the Navigation Services and the Event model. However, the book does not describe much about threading or symmetric multiprocessing (SMP), as these are topics that more advanced programmers would be interested in most. The Cocoa book is a bit more confusing at places (one could say that it is more “advanced” overall) than the Carbon one, but I have to admit that the Objective-C introduction was well written. Content listing and some sample pages (excepts) of both books can be found here and here.
A serious issue with these book is ambiguity about their target audience. These books are neither targetting amateurs nor advanced programmers very well. They are too confusing for new programmers, and already known ground for experienced ones (1/3 of the chapters of both books can be downloaded for free from Apple’s Developer site, for years now, or found on the Developer Tools CD)!
The only great thing about them is that they are good all-around references. If stuck on your project, they can serve you pretty well, when you are able to track down the exact information you need. My recommendation would be to get these books if you already have mastered C or C++ and you want to jump to Mac camp. However, in any case, it won’t be wise to go only for these two books alone, as you will probably lose track at some point of what is what exactly. I suggest you also take a look at “Cocoa Programming for MacOSX” as a tutorial book, and have Cocoa or Carbon books as reference books. If you are already a Macintosh or a NeXT programmer, maybe the knowledge you have so far is enough to get you going, so get these books only if you need a printed reference.
Overall: 7 / 10
and “Learning Cocoa”
at Amazon.com for less