views:

80

answers:

4

[Yes I have seen this question but I do not know C nor C++, otherwise the O'Reilly book would be great. Though some of the answers to the question are helpful]

I do not know C nor C++. I know C#, but only the "managed" stuff. I know Java, but have never dealt with JNI. (I also speak Ruby, PHP, and Basic variants, but that seems to be besides the point).

I would like to learn Objective-C for iPhone development particularly, but I'm coming from "higher-level" languages like Java and C#. Are there any resources that would be a good fit? I would really like something that leverages my existing knowledge and talks in terms of differences between Java (or C#) and Objective-C.

+4  A: 

You might find this helpful:

http://www.mecodegoodsomeday.com/ObjectiveCRef.pdf

It outlines some common/useful objective-c syntax/patterns/etc and gives you an idea of how they line up with similar ways of doing things in Java or C++.

Jasarien
Excuse my ignorance, but what's the 2.0 about? Is that for iPhone 3.x too?
Yar
The 2.0 is the version of Objective-C - kinda like how Java has Java 1.5 and 1.6 - Also, I updated the link to point to a much better / more informative reference card
Jasarien
cool the new link actually talks to the question :)... thanks for that and +1. So 2.0 is good for now 2010?
Yar
Yeah 2.0 is in full use throughout the iPhone frameworks and throughout Mac OS X since 10.5
Jasarien
not quite "full" use. Notably Garbage Collection is not enabled for iPhone, but it is a big part of Obj-C 2.0
Phil Nash
@Phil very true, good point. What I meant to say, as I wasn't clear, was that objective-c 2.0 (properties, fast enumeration, etc) is used in almost all iPhone frameworks, - not that the full gamut of ObjC2.0 features are used. My bad.
Jasarien
@Phil Nash, and that is in fact the cause of my major worrying about yet another language. No GC. Otherwise it would be just another language...
Yar
@yar It's not as bad as some people would have you believe. But do spend some time learning and internalising the memory management rules. They're not hard - it's more a question of habit. Hillegas' books explain it pretty well: http://www.bignerdranch.com/books
Phil Nash
+2  A: 

How about Learn Objective-C for Java Developers by Apress

Brandon Bodnár
I will buy it and read it and get back to you.
Yar
Definitely check out the google preview of it first, or read a little at a book store to make sure that it is along the lines of what you want and that you like the writing style. I normally like the Mac/IPhone Apress books, but sometimes the book just comes off wrong or is prone with errors due to changes in XCode or the SDK.
Brandon Bodnár
Yeah checked this http://search.barnesandnoble.com/Learn-Objective-C-for-Java-Developers/James-Bucanek/e/9781430223696 gives a nice review, though it might be his girlfriend who wrote it :) Seriously, looks quite nice.
Yar
for right now, I"m marking this as best answer. This is the best book I think I've read since The Stand by Stephen King in 1987.
Yar
A: 

I would strongly recommend you look into the Satndford University videos online:

http://www.stanford.edu/class/cs193p/cgi-bin/drupal/

They don't assume C# knowledge, but they do assume programming knowledge in general. The good thing about this is, you shouldn't attack iPhone development with C# in mind. Each language has its own way of doing things and its own quirks. If you try to write Objective-C code using your C# knowledge and patterns, you'll be screwed. You need to attack it with an open mind, and embrace the differences rather than fight it.

BFree
Ok, I'll check that out and keep in mind that "there is no spoon." Thanks
Yar
ACTUALLY the prerequisites are C-programming language, if you read the stuff that the page you recommend links to. While it's true that you need to keep an open mind, leveraging a language that you know to learn a new, different language, is a great strategy that works. I do Ruby like a Rubyist, not like a Java dev, though I learned Ruby using Java. And Spanish from Italian, not English, which would've been annoying...
Yar
+1  A: 

I would recommend Aaron Hillegas' books. Although not specific to a Java or C# frame of mind they cover the material in a friendly, accessible, yet informative and concise way that I think will appeal to people of most programming backgrounds.

I did the iPhone dev presentation for the Stackoverflow DevDays conf. in London - to an audience of about 90% .Net developers. I've put my slides from that presentation online. Not sure how useful they are without the narrative, but you're welcome to take a look.

Phil Nash
Everything helps at this point, just getting oriented. Thanks!
Yar
The books are not so great because they're not out yet. Am I missing something?
Yar
The iPhone book is not out yet, but Cocoa Programming for Mac OS X is, and a large chunk of it, including most of the intro stuff, is completely relevant to iPhone programming.
Phil Nash
Okay, the problem is that I have no idea what's relevant and not. BTW the presentation is great, the footnotes are like being there.
Yar
Phil, while I have you here, is slide 22 backwards? shouldn't it be `name = newName`? Otherwise I definitely have some concepts wrong.
Yar
Wow you're absolutely right! d'oh. Well spotted :-)
Phil Nash
Historical moment! I've spotted my first bug in Obj-C! Thanks for the dialogue Phil.
Yar