PDA

View Full Version : Want to learn Objective-C, but...




ninjaboi21
Oct 23, 2010, 05:52 PM
...I am not sure what book to read.

I came up with the following:
Programming in Objective-C 2.0 (http://www.amazon.com/gp/product/0321566157/ref=s9_simh_gw_p14_d0_i2?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=062C1Q9H3BRKYDMMYCPX&pf_rd_t=101&pf_rd_p=470938631&pf_rd_i=507846)
vs
Learn Objective-C on the Mac (http://www.amazon.com/Learn-Objective-ndash-Mac/dp/1430218150/ref=sr_1_1?ie=UTF8&s=books&qid=1287873168&sr=8-1)

My programming experience is fairly strict as I just only know a little C.
I read a little over the half of Learn C on the Mac (http://www.amazon.com/Learn-C-Mac-Dave-Mark/dp/1430218096/ref=sr_1_1?ie=UTF8&s=books&qid=1287873227&sr=1-1) which I found great and gave me a little push inside the world of programming. I read until the "Chapter 7: Pointers and Parameters".

Now I am not sure what to do, which book to take?
I have read a little in Programming in Objective-C 2.0 (http://www.amazon.com/gp/product/0321566157/ref=s9_simh_gw_p14_d0_i2?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=062C1Q9H3BRKYDMMYCPX&pf_rd_t=101&pf_rd_p=470938631&pf_rd_i=507846) (that is only Chapter 2, "The @implementation Section"), but I don't get 25% of what he is talking about. What's the definition of a method, class, instance etc. Will this come at a later point if I continue to read it?
The example he gives is not at all logical for me, here it is:

The "Kinda C" Version (which I understand 100%) (http://pastebin.com/BhhswGSr)


The "Objective-C" Version (which I understand 10%) (http://pastebin.com/jfMXVe22)


What will you recommend for me to read, keeping in mind my programming skills is limited and only know a little C.

Not sure if this was enough information, so please tell me if I should add anything :)

Thank you in advance.



chown33
Oct 23, 2010, 06:35 PM
There is no Fraction example in Chapter 2. It's in Chapter 3.

If you encounter something unexplained in a programming book, it's usually a good idea to keep reading for an explanation. Especially if it says "Here, then, is the program, followed by a detailed explanation of how it works."


If you are looking for a description of a class, method, instance, etc. in general terms, for all or most object-oriented programming languages, then try Wikipedia.

You can also read Apple's online docs and see if they explain things for you.

Object-Oriented Programming with Objective-C:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/OOP_ObjC/Introduction/Introduction.html

The Objective-C Programming Language:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html


Finally, there is a forum dedicated to Kochan's book:
http://www.classroomm.com/objective-c/

One reason for asking your questions there is the author is more likely to answer. Also, there are other people who have the same book who are more likely to be able to directly answer your questions.

ninjaboi21
Oct 23, 2010, 07:07 PM
Thank you for replying, but it was not that I was looking for.

I was more into finding out which book is best, and easiest to learn from with the programming experience/skill I got.
To go with the series or to continue with Stephen's 2.0.

robvas
Oct 23, 2010, 07:12 PM
Both, they're quite different. The Fruit book has more GUI examples but doesn't explain much about Objective-C, and the Hillegass book explains a lot more features.

ninjaboi21
Oct 23, 2010, 07:21 PM
Both, they're quite different. The Fruit book has more GUI examples but doesn't explain much about Objective-C, and the Hillegass book explains a lot more features.

So maybe start out with "The Fruit Book", get the basic stuff covered with GUI/screenshots and then move on to some more detailed/advanced stuff in Stephen's book?

Just to be clear, Hillegass wrote "Cocoa Programming for Mac OS X".
You ment Stephen or was it Hillegass?

robvas
Oct 24, 2010, 03:51 PM
So maybe start out with "The Fruit Book", get the basic stuff covered with GUI/screenshots and then move on to some more detailed/advanced stuff in Stephen's book?

Just to be clear, Hillegass wrote "Cocoa Programming for Mac OS X".
You ment Stephen or was it Hillegass?

I'm talking about a third book.

The fruit book doesn't cover much other than using each individual GUI control, and core data.

http://ecx.images-amazon.com/images/I/41CaAZDrl5L._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg

http://ecx.images-amazon.com/images/I/51m1tgiCfcL._AA160_.jpg

Then there's the Kochan book. Covers Objective-C 2.0 (hence the title of the book) but not THAT much about Cocoa/Xcode.

http://ecx.images-amazon.com/images/I/41LgE5wnlUL._SL160_PIsitb-sticker-arrow-dp,TopRight,12,-18_SH30_OU01_AA160_.jpg

Another good book (by Robert Clair) that covers a lot of Objective-C 2.0 but not that much Cocoa/Xcode. I actually bought this book on accident, the previous version has a very similar cover (and title) to the Kochan book. It's a real good book, though. I was upset that I made the mistake but now I'm not.

http://ecx.images-amazon.com/images/I/41pyKTm2fxL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg

Hillegass book. Again, it doesn't cover Objective-C 2.0 as much, but it does have a lot of information about how to do different things and also has some good exercises. It may be a little confusing for some people though.

I'd go check them out at the bookstore so you know what you're getting. I'd also buy one of each category. Hillegass/Fruit and one of the Objective-C 2.0 books to go with it. They complement each other well.