Language options for GUI applications on OS X
If I want to write applications that use the Mac OSX UI, is Objective-C the only choice that I have to take advantage of all the fr开发者_JS百科ameworks that Apple provides?
Can I use Java, which is installed with Mac OS X?
I think Objective-C will provide the best coverage, yes, but if you want to consider portability and the possibility of getting your applications running under Windows and/or Linux, then choose Qt and C++.
The frameworks for native UI applications on Mac OS X (collectively known as Cocoa) are written in Objective-C so Objective-C is probably the best choice for writing your own applications, although there are bindings for Python and Ruby.
There are other toolkits that can be used (Mac OS X is a *nix system after all) but unless you are writing cross-platform apps, most people will advise you to use Objective-C and Cocoa.
MacRuby, an implementation of Ruby 1.9 on top of Mac OS X Objective-C runtime and Foundation framework, is another way to go.
You still need a deep knowledge of Cocoa and a good understanding of Objective-C.
It will be provided with Mac OS X 10.7 Lion as a private framework. It already integrates very well in XCode 4 workflow, with templates for all type of application (including windowed, it goes without saying).
(MacRuby makes RubyCocoa, the Cocoa binding for Ruby, obsolete.)
The JVM for Java under Mac OS X is no longer provided by Apple, but by Oracle (see here).
I guess Objective-C is the best choice for native OS X Applications. But if you want your Applications to run under other OSs (like Windows or Linux), you'll most likely use C++ and some GUI-Toolkit which supports all of them.
If you come from the Perl world, here is Sherm's CamelBones too.
精彩评论