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

Mar 7, 2008, 12:45 PM
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!


Mar 7, 2008, 12:59 PM
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.

Mar 7, 2008, 02:14 PM
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 (http://en.wikibooks.org/wiki/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.

Mar 7, 2008, 02:19 PM
Aaron Hillegass's book Cocoa Programming for OS X (http://www.amazon.com/Cocoa-Programming-Mac-OS-2nd/dp/0321213149/ref=sr_1_1?ie=UTF8&s=books&qid=1204921153&sr=1-1) is generally highly thought of. Note that the third edition which is for Leopard is released at the end of June.

Mar 7, 2008, 02:22 PM
Dude, take the leap back! :)

Mar 7, 2008, 04:15 PM
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.


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?


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!

Mar 7, 2008, 04:20 PM
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.

Mar 7, 2008, 05:28 PM

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.


Mar 7, 2008, 05:49 PM
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.

Mar 7, 2008, 08:58 PM
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.

Mar 7, 2008, 10:51 PM
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.

.NET is more than a framework, it's also encompasses a managed environment, like the Java VM.

Mar 7, 2008, 11:25 PM
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.

Mar 7, 2008, 11:57 PM
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