Taking a leap from .NET to Obj-C. Can someone hold my hand? :)

Discussion in 'Mac Programming' started by goodfellaNW, Mar 7, 2008.

  1. macrumors newbie

    Joined:
    Mar 7, 2008
    #1
    Hi Everyone,

    So, I switched from PC to Mac a few years back. Have always been a .NET developer and have always wanted to switch to the better life (maybe?). As I am now sick of developing Windows apps and .NET web apps using Parallels, I have finally decided to take a leap and move into the world of OS X programming and let go of Windows forever.

    I would like to develop OS X apps, widgets, and possibly iPhone apps.

    I am a .NET C# developer. The question I have, is whether I should focus some time on learning Objective-C, or dive into Cocoa. I know there are other threads out there, but I didn't find one talking about making a move from .NET to OS X development.

    Therefore, since I know C#, I figured Obj-C wouldn't be that difficult to master... so I don't know if I should read up on Cocoa and pick up Obj-C along the way, or learn Obj-C from the ground up first.

    Maybe someone else was in my shoes a little while back? Or some of you Xcode devs can help me out?

    Looking at the following 2 books:
    Programming in Objective-C by Kochan (http://www.powells.com/biblio/4-9780672325861-0)

    Cocoa Programming for Mac OS X (http://www.powells.com/biblio?isbn=0321503619)

    I appreciate it!

    Alain
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    If you already know C# well and understand OOP, you probably don't need to learn Objective-C directly and can dive into Cocoa. You'll pick up the language fast when viewing examples. There isn't much to the language besides switching from dot notation to brackets ;)

    The second book is essentially the standard for new Cocoa developers.
     
  3. macrumors 6502a

    jalagl

    Joined:
    Jun 5, 2003
    Location:
    Costa Rica
    #3
    You'll find Objective-C easy to learn. One site that you may find helpful is this: Programming Mac OS X with Cocoa for beginners. I have a C, C# and Java background myself, and could pick up the language fairly quickly (at least enough to get something up and running). I haven't run XCode in probably a little over a year, though.
     
  4. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #4
    Aaron Hillegass's book Cocoa Programming for OS X is generally highly thought of. Note that the third edition which is for Leopard is released at the end of June.
     
  5. macrumors 6502

    Monkaaay

    Joined:
    Jun 19, 2006
    Location:
    Richmond, VA
    #5
    Dude, take the leap back! :)
     
  6. thread starter macrumors newbie

    Joined:
    Mar 7, 2008
    #6
    kainjow, jalagi

    Thanks for the input. I figured as much, but being so new to OS X I was hesitant as to what to do.

    Eraserhead,

    Thanks for the heads up. I saw that in another post (I think you mentioned it), but considering I have a little downtime now (i.e. 50 hour work week vs 70, lol)... I figured it wouldn't hurt to start up with this and then adapt as necessary. Maybe I am wrong in this approach?

    Monkaaay,

    What!!?!? :confused: :)

    I'll of course always develop .NET when the pay is right, but I really want to support OS X. Although C# and .NET have always been good to me, I'm excited about the challenge of doing something different and developing for OS X!
     
  7. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #7
    The hardest part of learning Cocoa is the API. There are a lot of classes and lots of things you can do. The Obj-C language is easy and I've never heard of people have trouble with it, so you'll probably save yourself some time if you jump right in with a Cocoa book or tutorial.
     
  8. thread starter macrumors newbie

    Joined:
    Mar 7, 2008
    #8
    kainjow,

    on that note, i've downloaded and installed xCode 3.1.. if I am going to use Hillegass's current book, should I backtrack and just use xCode 2.5 for now, or will 3.1 be alright?

    If I need to use 2.5, then I am debating whether or not I should just using an online tutorial and diving into 3.1 right away, and then waiting for the book in June if I were to still need it.

    Thanks!
     
  9. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #9
    Slightly OT, but you should try to pick up UNIX programming while you're at it. The beauty of Mac OS X is that you have these very slick, high level APIs provided by Apple but you also get practically everything that's available on the Linux/BSD/Solaris platform as well.
     
  10. macrumors newbie

    Joined:
    Mar 7, 2008
    #10
    isn't Obj-C itself Cocoa

    isn't Cocoa likened to .NET, as Obj-c is to C#? Correct me if I am wrong, but I thought Obj-C is the OOP language with its inherent language constructs, and Cocoa is the framework.
     
  11. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #11
    .NET is more than a framework, it's also encompasses a managed environment, like the Java VM.
     
  12. macrumors 6502

    Joined:
    Jun 16, 2004
    #12
    One thing to watch out for during your switch is that Obj-C uses messages to objects, which can be very slow. Be careful with them in loops.
     
  13. macrumors 68000

    tominated

    Joined:
    Jul 7, 2006
    Location:
    Queensland, Australia
    #13
    from memory, aaron hillegass' book is aimed towards people with previous C knowledge and Steven Kochan's book is for learning objective-c (not the cocoa things surrounding it) with no previous knowledge of coding. You're probably better off picking up both books, but i'd wait for the 3rd edition of hillegass' book
     

Share This Page