Learning the iPhone
Jan 02, 2009 by Bill Dudney
Last week a friend of mine (and the co-teacher with me on the Cocoa and iPhone Studios) Daniel Steinberg posted that he thought that learning iPhone without learning Cocoa was possible but you miss a bunch of stuff that really helps you to make better applications.
I whole heartedly agree but would love to hear from others what they think.
And as usual I'd love to see you at either of the studios.









It depends on your definition of Cocoa. I've never been 100% sure what Cocoa is... Is it the frameworks? Does it include the development tools such as Xcode and IB? Does it include Objective-C?
Personally I think that you have to know all of the above but probably the most useful skill is being able to understand and navigate through Apple's documentation, especially that pertaining to their frameworks.
Posted by Simon Wolf on January 02, 2009 at 11:41 AM MST #
I suspect that I disagree completely, but I think you need to be a little more specific about what you mean by Cocoa.
From my point of view, I'm interested in developing for the iPhone. Mac desktop software? Not so much. And by "not so much," I mean "zero." Mac desktops just aren't an interesting platform, and there are always new things to learn in the world. (There's that Erlang book I need to finish, and I've always wanted to spend a few days playing with Smalltalk, and the F# guys are doing some interesting things, and, and, and...)
I think this is a problem that Apple hasn't really though about yet. I don't think I'm alone in this; most of the new iPhone developers I've asked have a similar take.
My prediction for the next two years? Some percentage of current Mac developer time is spent on iPhone work. No one replaces them. There will be virtually no new developers who start on the iPhone and move to Mac desktop software.
Posted by James Moore on January 02, 2009 at 03:27 PM MST #
James,
Could you not say the same about Java developers and Android? Or Windows developers and whatever Windows for cellphones is called this week?
I don't think there's a finite number of Cocoa developers in the world (well, apart from population limits of course ;-). If the market (either iPhone or desktop) is growing, attractive and profitable then there will be new developers.
iPhone development has managed to be a run-away success despite Apple not overly bending down to developers new to Cocoa.
Bill:
As to your original point. The same could be said about Desktop Cocoa development and Carbon development. Having multiple strings to your bow will always help you.
Posted by Jonathan Wight on January 02, 2009 at 07:03 PM MST #
@Simon - totally agree on the 'you need to know all that' front, knowing the docs is important also, but i think the most important thing (and the reason its important to know cocoa) is to build your intuition on how things work. Studying Cocoa (AppKit esp) really helps you to know the rest of the frameworks.
@James - Cocoa in my mind is all the stuff that you can do with the app dev frameworks. If you know them you know iPhone too, apart from a few device specific tweaks. For example if you know KVO you know a big part of why objc is cool. You can still do a lot without it but you can do a lot more once you get it. You probably won't come across KVO on the iPhone unless you like to dig. If you do Cocoa on the desktop you will be forced to at least look at KVO by the discussions of table views or by Core Data. You will be a better iPhone developer by learning Cocoa.
@Jon - too true, never hurts to learn something new.
Posted by Bill Dudney on January 02, 2009 at 08:54 PM MST #
Sure, if you had a pretty good background in C++ (or C#) and you had a pretty good understanding of Object Oriented Technology and you picked up a used book on OBJC and a good book on iPhone development like "iPhone SDK Development" you could write iPhone apps all day long.
However, I think the natural progression is to learn the bigger Cocoa scene first and then scale down to the iPhone.
Besides, who knows what iPhone OS 3.0 and beyond is going to look like. It may be that Cocoa and iPhone development will begin to merge someday.
Posted by Henry Smith on January 03, 2009 at 05:34 AM MST #
I was arguing against a point that you didn't make - unfair of me, sorry about that. There seems to be an idea floating around out there that the success of the iPhone in terms of developer mindshare will translate to more developers writing for Mac desktops as well, and I don't think that's true.
And I disagree about the finite-ness of Cocoa developers; good developers are definitely a scarce resource in the world, and they have a limited amount of time to learn new things. People have to be convinced that it's worth learning Cocoa over [Erlang/F#/Smalltalk/Whatever strikes your fancy]. I'm sort-of convinced that it's not worth my time to learn non-iPhone Cocoa bits.
The reason I say "sort-of" is that there aren't actually that many Cocoa things that don't affect the iPhone. The UI pieces that don't run on the iPhone are obvious things to ignore, but it's not like they'd take a vast amount of time to figure out. Core data is irrelevant for now, but again, it's not like it would take much time to come up to speed on it. I probably should take some time to do a cocoa overview and figure out what other pieces exist but don't overlap. (Or, in a perfect world, someone would do a blog post on exactly that subject...)
In the end, I suspect I'm making a distinction that doesn't really have much real-world effect. My saying "I only care about Cocoa if it affects the iPhone" pretty much seems to mean "I need to know virtually all of Cocoa minus some edge cases."
Posted by James Moore on January 04, 2009 at 12:57 PM MST #
I was arguing against a point that you actually didn't make - unfair of me,
sorry about that. There's an idea out there that the success of the iPhone in terms of developer mindshare will translate to more developers writing for Mac desktops as well, and I don't think that's true.
It seems that there aren't many Cocoa things that don't affect the iPhone. The UI pieces not on the iPhone are obvious things to ignore, but it's not like they'd take a vast amount of time to figure out. Core data is irrelevant for now, but again, it's not like it would take much time to come up to speed on it. I probably should take some time to do a cocoa overview and figure out what other pieces exist but don't overlap. (Or, in a perfect world, someone would do a blog post on exactly that subject...)
I suspect I'm making a useless distinction. My saying "I only care about Cocoa if it affects the iPhone" pretty much seems to mean "I need to know virtually all of Cocoa minus some edge cases."
Posted by James Moore on January 04, 2009 at 12:57 PM MST #