views:

520

answers:

5

As a programmer, I've been pretty much stuck in the Windows world. I invested a lot of time and effort learning MFC, ATL and, recently, .NET (mostly WinForms, I'm not interested in Web development for now). Since I don't have Parallels (and won't buy any software or hardware in the following months), I can't afford to run my old Windows apps now, so I would like to port them to the Mac.

My main questions are:

  1. I've read there are two main APIs, Carbon and Cocoa. Which one would you suggest me to learn first? (I don't know Objective-C, but I'm not against learning it.)
  2. What are the main development tools (IDEs, debuggers, etc.) for the Mac?
  3. Are there any frameworks or RAD tools that help with with window creation (I'd prefer a MFC-like approach to a VB-like drag-and-drop editor).
  4. Could my current skill set help me in learning to program for the Mac, or do I have to start basically from zero?
+21  A: 

To answer your questions:

  1. Cocoa. And learn Objective-C. There are several questions here on SO about this. You could also try RealBasic.
  2. Xcode, free with Mac OS X.
  3. It's in Xcode. Xcode has a UI builder.
  4. It will help, but the Mac is a different animal. I suggest Cocoa Programming for Mac OS X by Aaron Hillegass.

I come from a similar background (Windows, ASP.NET, C#) and I found the Mac to be very fun as a platform for software development. The iPhone is very interesting too. I'd suggest you browse through past questions here on SO for more info about Mac development. There have been some great questions and answers.

Robert S.
A: 

You go cross-platform(ish) and learn Ruby. Leopard comes with 1.8.6 as core. You can easily code Ruby from the standard text editor but TextMate is as much of a joy to use as OS X itself.

You could try the Ruby Cocoa Beta book from Pragmatic Programmers as a manual (http://www.pragprog.com/titles/bmrc/rubycocoa).

I haven't tried Objective-C yet (it's on my list for this year though!) so I can't compare, but Ruby is a great language for coding in.

Urf
Ruby is not a good language for developing Mac OS X native apps.
Robert S.
Why? If you already know Ruby, you might well start with it to ease the learning curve, but if you're going to learn Mac programming I'd advise getting familiar with the standard development environment.
David Thornley
Ruby seems to be fun. Not what I would use to do computer graphics, for example, but very good to crunch the text files and that kind of things.
Eduardo León
If you want to learn Ruby, learn Ruby. I have no problem with that. I don't see it as a useful way to start using Mac programming, unless you already know Ruby.
David Thornley
I'm not gonna use Ruby to develop desktop apps. And what I write most of the time is desktop apps. (Or, to be more precise, desktop executables.)
Eduardo León
I concede to your points, the standard dev env is best for Mac programming. However, I thought learning Ruby might make it easier to develop no matter which platform you were on. Also, now that you can use Cocoa, the main issue of Ruby for Mac desktop development (i.e. lack of GUI support) is gone.
Urf
+4  A: 

Objective-C is a highly underestimated language and Cocooa is a great and easy to learn framework. The documentation on Apple Developer Connection is worth checking out. If you already have some background in the C-style languages: C/C++/Java you will learn it in no time.

I know Java (the language), but not its associated tools, so I haven't done anything useful with it. But I know C++ and its associated tools quite well.
Eduardo León
The transition from C++ to Objective-C is even better than coming from Java to C. Objective-C is a real superset of C unlike C++ which is something new and just looks like C.
+1  A: 

Also, you need to learn about UNIX03, which one is the ceritification that OS X have. Remember that OS X comes from a XNU and FreeBSD (Darwin), and most of his system call are based on SUSv3 standard.

daniel
+1  A: 

If the text editor in XCode doesn't suit you, I'd recommend BBEdit ( or it's free little brother Text Wrangler).

In addition to the Hilligas book, the Apple website has a pretty good introduction to Objective-C.

unclerojelio