What would you recommend for OS X development of a graphical application like those possible in WPF?

My specific background is in Smalltalk & Java, but I currently work mostly in DHTML/.NET (ASP.NET/C#).

+13  A: 

Cocoa. Considered by many to be the best application framework ever. The language is Objective-C, SmallTalk-like language that inspired the creators of Java.

Really, there is no reasonable alternative to Cocoa for OS X development, unless you have specific needs like wanting to be cross-platform.

+1  A: 

I'm not sure what WPF is, but most development for the OSX platform is done in Objective-C with Cocoa. You can use the deprecated Carbon APIs with other languages like Java, but new applications for OSX really should be developed in Objective-C. You can start with Apple's guide with XCode as your IDE.

Kyle Cronin
+2  A: 

Cocoa is the primary framework to use on Mac OS X. It's what Apple uses, it's what most new development uses, and it's where new features are principally added.

If you're coming from WPF, I think you might find quite a few of the concepts in Cocoa familiar. (Despite the fact that Cocoa is just a bit older.) It's built entirely around MVC, there are property-change notifications and bindings, there's animation support, there's a persistence and object-graph management framework, and so on.

(Also, you might want to add "mac" to the tags.)

Chris Hanson
+4  A: 

Aside from Interface Builder which is included as part of the Xcode tools, you can also use QT, GTK+, AWT & SWING (for your Java background), Tk, Squeak (for your Smalltalk background), Shoes (very cool little Ruby GUI toolkit), FXRuby (more Ruby), wxWidgets, XULRunner, and others I'm sure I've forgotten. For the most native-like apps, however, Interface Builder is your best bet.

+2  A: 

With your Java background, don't get sidetracked by the now deprecated Cocoa-Java bridge. Early in OS X history, Apple provided a (laboriously hand-maintained) Java interface for the Cocoa libraries. Because of the semantic differences between Java and Objective-C, many of the most powerful features of Cocoa, including Key-value binding (upon which many other features are built) is very difficult, leading to divergence of Objetive-C and Java capabilities and the eventual deprecation of the bridge. All Cocoa development is best done with Objective-C or one of the many (automatically generated) bridges to dynamic languages such as Python or Ruby.

With your background in smalltalk, I would expect you could pick up Objective-C in a day or two.

Barry Wark

To put it a different way than previous posters: if you are not designing your interface in InterfaceBuilder and manipulating it with Objective-C, then you are going to end up with an application that does not look, feel, act, or work the way a Macintosh application should, and it will stick out like a sore thumb to users. It will be an unpleasant experience for the user compared to other apps, and they will likely desire a different application because of it.

Toolkits like QT are acceptable if your application already uses QT and you want to port it fast, but if you're writing a new application (or a separate GUI) then write it in Cocoa using ObjC or ObjC++.

Dan Udey

You might have a look at PyObjc which is a bridge between the Python programming language and Objective-C, including bindings for Mac OS X components, including Cocoa.


With a Smalltalk background, I'd recommend straight Cocoa and Objective-C. However, if you're leaning towards a dynamic language, RubyCocoa will let you use Ruby which I think you'll find easier to pick up than Python.

Andy Dent