views:

329

answers:

10

I have built some basic apps for iPhone and Mac with a general understanding of Cocoa, but haven't had a detailed understanding. Now I want to go deeper.

I have just finished the Objective-C documentation at MacDevCenter. It was great to get in-depth look but took far too much time, specially because a lot of it is conceptual, and it's hard to build detailed examples to make use of the concepts.

Now I am on to Cocoa, but feel like it would be too much work to go through 250 page documents for Cocoa itself, then KVC, Cocoa Bindings, and Core Data.

Would I be better off at this stage picking up a good book on Cocoa (Hillegass' is too sparse I think) or should I just bite the bullet and go through the docs?

+12  A: 

Apple's documentation is generally excellent. The API reference in the very least is some of the best I've read (right up there with Java's API reference), and is a very valuable asset. I'd suggest reading the overview pages for topics you're interested in to get a general "feel" for how they work and a starting point, and then just start writing code. You can refer to the documentation to fill in blanks that you encounter while writing code.

Writing a small project to exercise your use of APIs you'd like to learn is a great way to get started.

Steven Schlansker
This is a more sufficient answer than what I was going to post, which was "yes"
Rob Fonseca-Ensor
A: 

Hillegass' book will drive you to the free documentation every time he fails to make sense in order to be "funny" (i.e. every other paragraph) anyway, so unless you just want to give him $40, you will be much better off sticking to what Apple gives you au gratis. At the very least you won't pick up any of his horrible UI design habits.

You don't really need to go through ALL the bindings and Core Data docs page by page--half of it is stuff you'll likely never use. Knowing where to look for more information is far more valuable a skill than memorizing APIs.

Azeem.Butt
I _really_ disagree with you on that first paragraph. Apple's reference has very little material for beginners. It's much better to buy a book or use online tutorials. Apple's documentation is excellent for more experienced developers.
Georg
I really don't think you've read any of Apple's tutorials for beginners.
Azeem.Butt
Gotta agree with gs... Hillegass' book is an extremely approachable resource. I'd recommend using both the Hillegass book and Apple's documentation in tandem. I found Apple's material more easily contextualized after reading Hillegass.
Jarret Hardie
I don't agree with NSD's first paragraph, but his second is a perfectly valid answer. So +1 from me. Just because an opinion expressed is not one you agree with is no reason to downvote IMHO. At least a valid answer was provided, not just an opinion.
Abizern
Abizern, I agree. +1 to NSD (I did not downvote) to similarily balance out.
Jarret Hardie
Rev316
To pile on, I strongly disagree with NSD's comments on Hillegass's book. He's an experienced teacher, and it shows in how easy his book is to read. As for it being "sparse", the intent of the book is not to be a definitive Cocoa reference, but a great introductory text, and I think he succeeds at that. Every Mac or iPhone developer I've recommended this to has said that it helped them make sense of core concepts.
Brad Larson
+3  A: 

I'd recommend an excellent book released some time ago: ‘Cocoa Design Patterns’ by Erik M. Buck and Donald A. Yacktman.

Stream
While I think this is an excellent book, it isn't much good for someone who is trying to learnn Cocoa. It's a good explanations for why things are done as they are, but I wouldn't recommend it for someone who isn't comfortable with Cocoa.
Abizern
In this case, the Hillegass' book should be the first one :)
Stream
I said it before, and it bears repeating: "This book is a comprehensive and authoritative treatment of design patterns and their practical applications in Cocoa projects. I recommend this book to anyone who wants to advance from intermediate to expert proficiency as a Macintosh developer."
NSResponder
A: 

Apple's documentation is an excellent reference, but I agree that it's a huge resource to try to learn Cocoa from in the first place. Besides, you probably don't need to know the whole API up front -- just learn each part as you need it.

When I started learning, I just picked a project, sat down and started trying to code. When I ran into something I didn't know, I just googled it, which led to a tutorial and/or the relevant page of Apple's documentation.

In my experience, the best way to learn something like this is, well, experience.

Asher Dunn
+1  A: 

The reference is great and invaluable, but might not be the easiest way to start coding (as people have mentioned).

I started looking at the stanford lectures on iphone development, then coded as I went along. I've actually used them as reference once or twice as well... They are available on itunes for free.

Jonatan Hedborg
+1  A: 

It depends on what other programming experience you have and how you learn best. If you're fairly new to programming in general, I'd recommend Hillegass to start. If you're fairly competent at OOP but don't know Objective-C, you can go for Apple's "Introduction to The Objective-C Programming Language" to learn ObjC's language features. If you've programmed using paradigms other than OOP, you could look for general OOP book recommendations here on SO (e.g. "Best Referece to learn OOP independent of languages?"). I also second Jonatan's recommendation to check out what programming videos iTunes University offers. They are recordings of lectures from top-tier universities and generally of good scholastic quality (I only qualify this with "generally" because I haven't seen them all; the ones I have seen invariably were of quality). No matter where you go to learn ObjC and Cocoa, you'll still yourself using Apple's docs as reference.

As you learn, you might also find CocoaDev a useful ancillary source.

outis
+7  A: 

I've found Hillegass's book to be far from sparse. In fact, I've found it to be one of the most dense books on programming I've read. I've re-read most of the chapters at least 4 times, and each time understood more. By re-reading, I've understood the reason he included a certain paragraph and how it fits with the bigger picture. He spells everything out very clearly and doesn't waste words. I'm amazed at the amount that's contained in that book.

You mentioned that you want to learn by doing, instead of by reading. The Hillegass book has a section at the end of each chapter where you put what you've learned to the test, by building an application.

Of the three things you talked about, KVC, Cocoa Bindings and Core Data, the first two are covered very well. I did find the Core Data chapters to be a lot more sparse. That's the only part of the book that I haven't been able to understand without other documentation. The Pragmatic Programmers book covers it much better.

Anyway, the answer to your question is: it depends. If you've managed to work your way through the Mac Dev Center documentation, it may be that you're the kind of person who learns easily from that style of resource. If you like learning from books, the best one is Hillegass.

nevan
+2  A: 

Of course you can dive into Apple's documentation, but to me, I found Hillegass' book is a good start for learning Cocoa. The value of the book, I think, is the introduction of the conventions and idioms of Cocoa.

Is it really clear for a new Cocoa developer to find out information on issues like when and when not to send message autorelease to an object? You can argue that a single Googling will do, but how do you know there are these kind of issues in the first place?

Go get a good book, look through it and take notes. It could save your time. For me, on Cocoa, the book is Hillegass'.

weipin
+1  A: 

Aaron Hillegass's book is the text for his one-week cocoa development seminar, and it has been revised over several years of teaching Cocoa to beginners. Aaron's course is where Apple sends their own employees, now that they don't do the Cocoa course in-house anymore.

NSResponder
A: 

Apple's documentation generally contains excellent API references, but (in my opinion) lacks equivalent topical guides. This makes it a bit hard to follow for beginners (Jacob Kaplan-Moss in the link I just gave makes the point that Python's documentation is like this, but I think Apple's is much more).

My recommendation would be to pick up Hillegass's book, alongside a project. The first few chapters explain fundamentals, so make sure to read those (and do the exercises!), or you won't be able to get far. Then try and implement your project idea; when you reach a wall, look through the Table of Contents and the glossary of the book and see if there's something that covers it. If you find something, use this as an excuse to read it fully and understand it. When you're finished, you'll have both a greater understanding and a project to show for it. Furthermore, you'll know what to search for in Apple's API references next time you try to implement something. This helped motivate me to finish the book, maybe it'll be helpful for you.[1]

[1]: (disclaimer: I have an odd learning style)

meeselet