[ Go back to normal view ]

BW2 :: the bitwise supplement :: http://www.bitwisemag.com/2

Objective-C Book Reviews
For books on Mac/iOS programming

18 January 2012

by Huw Collingbourne

The principal application programming language both of the Mac and Apple’s various iOS devices is Objective-C. It is not the easiest of languages to learn. A beginner may find its mix of C and Smalltalk-like syntax baffling. Even an experienced programmer is likely to have problems, not only learning the language but also getting to grips with the Xcode development environment. Here I look at four books that might help you get over a few of the barriers…



These are the books…

Objective-C Fundamentals $44.99
by Christopher Fairbairn, Collin Ruffenach, Johannes Fahrenkrug
Manning Publications
ISBN-10: 1935182536
ISBN-13: 978-1935182535

Objective-C Programming: The Big Nerd Ranch Guide $39.99
by Aaron Hillegass
Addison-Wesley
ISBN-10: 0321706285
ISBN-13: 978-0321706287

Cocoa Programming for Mac OS X (4th Edition) $49.99
by Aaron Hillegass, Adam Preble
Addison-Wesley ISBN-10: 0321774086 ISBN-13: 978-0321774088

Advanced Mac OS X Programming: The Big Nerd Ranch Guide $59.99
by Mark Dalrymple
Addison-Wesley
ISBN-10: 0321706250
ISBN-13: 978-0321706256

At first sight, three of these books appear to be aimed at more or less the same type of reader: Objective-C Fundamentals, Objective-C Programming and Cocoa Programming for Mac OS X all seem to offer guidance for the first-time Objective-C programmer.

In fact,Objective-C Fundamentals is specifically targeted at iOS developers. So if you want to write standalone programs to run on your Mac, this is not the book for you. Personally, I feel the authors strive to cover an awful lot of ground for an fairly elementary-level book. As a result the book sometimes seems to rush through important topics. For example, chapter 2 begins by creating a database application before it even gets around to discussing absolute basics of programming such as ‘the importance of descriptive names’. The book has chapters explaining everything from creating objects to memory management and debugging. It uses a ‘rental manager’ application as its core example which may risk losing the reader’s interest unless you happen to have a special interest in real estate.

I personally prefer Objective-C Programming. This doesn’t take a monolithic “let’s build an app” approach. Instead it provides more of a topic-related guide that makes it easier for programmers with differing levels of experience to ‘dip in’ and read only the sections that are of particular interest. It provides a sound reference to the main features of the Objective-C language and the core Cocoa framework classes. Its main limitation, in my view, is that it has little in the way of step-by-step tutorials. If you want a book that guides you through the entire process of designing, coding, debugging and deploying, this is probably not the ideal choice.

Cocoa Programming For Mac OS X is a much more substantial book (almost 500 pages). It’s a bit like the big brother of ‘Objective-C Programming’ and, indeed, the author of that book is also co-author of this one. This book concentrates almost exclusively on Mac application development, with only a small section devoted to iOS. It begins with a simple, but useful, tutorial on using Xcode and moves rapidly on to describing the nitty-gritty details of Objective-C and Cocoa. Memory management, debugging, event-handling and multi-threading: these are the types of topics dealt with in reasonable depth. I’d say this is a pretty good choice for a competent programmer moving from some other language such as C#, C++ or Java.

Advanced Mac OS X Programing is another big book (over 600 pages). This one, as the name suggests, is definitely not aimed at the newcomer to Objective-C. It deals principally with the finer details of development such as performance tuning, multi-threading, IO, DTrace and memory management. If you are already a competent Objective-C developer, you should probably think of adding this book to your library. An excellent resource.

In Summary

If you are an experienced programmer moving to Xcode from another IDE and to Objective-C from another language, some of these books are not as useful as they might be. For example, try searching for ‘new’ or ‘constructor’ in the indexes. ‘Objective-C Fundamentals’, ‘Objective-C Programming’ and ‘Advanced Mac OS X Programming’ have no index entries on either of these terms. ‘Cocoa Programming’ has an entry for ‘new’ but not for ‘constructor’. If you happen to chance upon the index entries on ‘init’ (in all but ‘Advanced Mac OS X’) you might find what you are looking for. But finding the index entry for ‘init’ rather than ‘constructor’ assumes that you are already familiar with the Objective-C way of doing things which, if you are coming to it for the first time, you won’t be.

‘Advanced Mac OS X’ provides what its name suggests – a fairly in-depth guide to programming the Mac. It assumes that you already know your way around Xcode and need to get to grips with some of the more advanced features of Objective-C. In my view, ‘Objective-C Fundamentals’ is incorrectly named. It is a book that is specifically aimed at teaching the basics of iOS programming. If that’s what you need it does a pretty decent job but I don’t think it’s suitable for a complete novice. ‘Objective-C Programing’ covers both iOS and OS X. I don’t think it’s ideal as a first book for a new programmer but it’s a good choice for someone with at least elementary programming skills who’s already got past the “Hello world” stage in Xcode.

For a programmer experienced in other languages and IDEs but new to Objective-C and Xcode, ‘Cocoa Programming For Mac OS X’ would be my recommendation. It’s a solid book that fairly quickly takes you from the fundamentals to more advanced programming.