1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Best book to learn Cocoa and Objective C?

Discussion in 'Mac Programming' started by valiar, Jul 29, 2007.

  1. macrumors regular

    #1
    Well, I know there is no single "best" book... :)

    But what books do you like, what books do you not like, and what would you recommend?

    All the major programs I have been writing so far are in Java, and I like Java - but I really want to switch to Mac-specific language for the reasons of performance and interface prettiness.
     
  2. macrumors 68040

    iSee

    #2
    The single best book for Objective-C is "Programming in Objective-C" by Stephen G. Kochan.
     
  3. macrumors 68000

    Littleodie914

    #3
    And for Cocoa programming, the hands-down champ is Aaron Hillegass' "Cocoa Programming for Mac OS X: Second Edition." :)
     
  4. macrumors 6502a

    #4
    I second both of these nominations.
     
  5. macrumors member

    #5
    I third that! :), i would start by reading the objective c book first
     
  6. macrumors 6502

    #6
    Would you say the give the same recommendations for me if i told you i hadn't really done any programming since a little pascal at University some some 12 years ago ?
     
  7. macrumors 65816

    MacDonaldsd

    #7
    I have both sitting beside me know. Id recommend the both of them. As you are not a programmer currently in any language, you really need the both of them.
     
  8. macrumors member

    #8

    sure, the objective c book is very basic and is written to help you getting started in objective c. after finishing that you can jump in the cocoa book
     
  9. jsw
    Moderator emeritus

    jsw

    #9
    One item to note is that Objective-C is significantly enhanced in Leopard, so note that some of the things in those books are going to be outdated.

    Not a lot, and not so much as to be a problem. Just some of the painful things have been fixed. :)
     
  10. macrumors 65816

    MacDonaldsd

    #10
    I think you can still use the old syntax though can't you ?
     
  11. jsw
    Moderator emeritus

    jsw

    #11
    Yup, at least for the most part, as far as I know. Some of the tedious bye necessary garbage collection, etc., tasks have been made easier or eliminated, though.

    The demo I saw in January of all the spiffy new features reminded me a lot of how eclipse was with Java years ago, but still.... :)
     
  12. macrumors regular

    x704

    #12
    I would like to add to that a C book or two. Objective-C is basically C only with OOP built in, so all C stuff applies to Objective-C as well. I have a couple C books in addition to the Objective-C one that everybody adores... good stuff :)
     
  13. macrumors newbie

    typoboy

    #13
    Best Devel environment

    This is a perhaps related question from a Mac development novice: What would you suggest is a "best" development environment for learning to program for the MAc/iPhones, etc.

    I have my eyes on a MacBook (blk) and the iPhone SDK, since my interest is in developing apps for the iPhone. Recommendations would be appreciated.

    TypoBoy
    Washington, DC USA
     
  14. macrumors member

    #14
    I'd doubt there is anything much better than XCode for iPhone development considering it has the iPhone simulator build in.
     
  15. macrumors 6502a

    #15
    I would recommend hillegass, (third edition is the latest, idk why they're recommending 2nd) and from what I've heard kochan too. (heaven't used it)
    But really, I think free online tutorials are way better than books. The best tutorial I've seen is becomeanxcoder at www.cocoalab.com it's a little out of date but recent enough that it's easy to figure what's what. The tutorial assumes you don't have any programming knowledge, which makes it great for anyone between that and being a cocoa/objc expert. So yeah... it's an awesome tutorial.

    You can also get in depth into C, which may be smart, and C++ too if you're interested, at www.cprogramming.com. I used it and it's a great place. I never understood pointers until I went there.

    Good luck!
    Nate
     
  16. macrumors newbie

    typoboy

    #16
    Thanks for the tips

    I'm great for beginning projects and not seeking out the advice and help I need to complete them. So I'm taking a different approach here, and it has helped already. You have confirmed my suspicion that I should focus on Objective-C, and the digital book in the Cocoalab starts at a great place for me.

    I should share something else I came across yesterday, a great post by a guy, Mike Ash. In his post, he chronicles his ordeal with Apple, as he worked through getting an iPhone app approved. I feel that, bottom line, the hassle one goes through is frustrating and to some degree unnecessary; but that you get a lot of value (enormous, inexpensive market exposure for you app). Whatever your opinions, the post should be sobering to folks who, like me, had plans to download the iPhone SDK, whip up a quick app, and go on to, in my case, revolutionize the non-profit world by porting a database of volunteer and charitable giving opportunities to the iPhone. Seems it just happen so simple, even for an experience Mac developer:

    http://www.mikeash.com/?page=pyblog/the-iphone-development-story.html

    tanx
    TypoBoy
     
  17. macrumors 601

    t0mat0

    #17
    Bear in mind that time has passed, and Apple was basically setting up the App Store from scratch. I'd imagine that some of the problems experienced have been smoothed over.
     
  18. macrumors newbie

    #18
    Updated

    Both of the books mentioned in this thread have been updated recently. I have the 3rd edition of Hillegass at hand (well, on the coffee table). If you know C, you probably won't need a book on Objective-C just to get going with Cocoa programming. Get the Hillegass book, look at his introductory chapter, and start slinging some code.

    If you're not already a C or C++ programmer, I can recommend the Kochan book just on the basis of having been a Stephen Kochan fan for 20+ years. I've looked through it at the LBS, and hope it will be in my stocking in a few days. In the meantime, I've written a couple of Cocoa Apps already, and am working on my third now. Do get the updated edition, which covers the new language features, and forget about memory management (until it bites you).
     
  19. macrumors regular

    #19
    Hey, thanks for making me feel old! ;) Seriously, thanks for the kind words.

    FYI, The second edition of my Obj-C book will be released this week. There's another thread here that describes some of the changes I've made.

    Cheers,


    Steve Kochan
     
  20. macrumors newbie

    #20
    Thanks, Steve. Guess who just preordered it on Amazon? :)
     
  21. macrumors 6502a

    TodVader

    #21
    I preordered a long time ago. I hope amazon.ca gets it soon. It's now 'in stock' at amazon.com.
     
  22. macrumors newbie

    #22
    how much objective-c does the hillegass book assume that you know? if i know python and quite a bit of java will i be able to read this book without reading a book about objective-c first?
     
  23. macrumors newbie

    #23
    If you don't already know a pointer-based language, especially C or C++, you're probably going to get lost as soon as you encounter any pointer-based code. That's somewhat rare in Obj-C, other than declaring pointers to objects, but you'll bump into it sooner or later.

    I'd recommend getting the Hillegass book, working through the examples, and then dive into Obj-C on the side once you get lost.

    For an old C/C++ programmer, picking up enough basics of Obj-C to pound out a Mac application is pretty simple process. I know, I did it. :eek:
     
  24. macrumors regular

    #24
    bringing this thread back to life :)

    I decided recently I wanted to dive into the world of programming, only knowing html and messed with a bit of java and css, Objective-C is something completely new to me.

    I picked up the Kockan's Programming in Objective-C 2.0, Cocoa Programming for Mac 3rd edition, and Beginning iPhone 3 Development: Exploring the iPhone SDK. All 3 of them seem like great resources and I can't wait to start the learning process, but I want to make sure I do it right.

    I have heard conflicting advice on where to start. I was originally told I should start on the Objective-C and learn the basics of that and them move onto Cocoa and round it out as an overview with the Beginning iPhone Development book. Another programmer suggested starting with the Beginning iPhone book, then Objective-C.

    Any suggestions from people who have gone through these books?
     
  25. macrumors 6502a

    GorillaPaws

    #25
    Start with Kochan. It's command line, so it'll be less sexy than working with the interface builder stuff that you'll see in the other books, but Objective-C is really a pre-requsite to understanding Cocoa/Cocoa-touch. You may get a bit bored with the command-line apps and it would be ok to mess around with some of the earlier chapters of the other books, but you should really finnish Kochan (especially the 2nd half that focuses on the foundation framework) before pushing very far into the cocoa/cocoa-touch programming stuff.
     

Share This Page