views:

78

answers:

2

If I were to write a commercial (=sold for money) app for Mac OS X (not iPhone) would it be wise to do so in Javascript with JSCocoa? I know Javascript by heart but next to nothing about Objective-C and it scares me. Any thoughts?

OTOH, I can always dive into Objective-C. But still, this looks like a nice shortcut. Or is it too good to be true?

+1  A: 

If I were you, i'd be thinking about the costs of each approach. If you take the JSCocoa route, you save time not having to learn Objective-C. Conversely, if you take the Cocoa approach, you burn a bit of time learning the new language, but will likely save a fair bit of time simply because you are using a mature, well integrated development platform for the whole development process. Also, it seems likely that it will be at least moderately harder to debug Cocoa issues, as you've got an extra less-proven framework abstracting you back from it.

I asked a similar question on here a few weeks ago - QT and C++ vs Cocoa and Objective-C for native application development - http://stackoverflow.com/questions/1957424/qt4-5-vs-cocoa-for-native-mac-ui/1997567#1997567.

I decided to go with the learn Cocoa & Obj-C route, and have been pleased with the outcome. X-Code is a strong development environment, and it's integration with Interface Builder is excellent. The Apple documentation is great, and there are a heap of tutorials floating around on the internet for all of the more off-the-beaten-path bits. I was also concerned with learning Objective-C, and initially tried to avoid it by pushing calls back into C++, but it turns out that it's additions to the C syntax are easy to get your head around, and again, the Apple documentation on the language itself is top notch.

Hope this helps!

Scott
Thank you!! (Yes, it helps a lot.)
Ron
+4  A: 

Objective-C is such a relatively small part of learning Cocoa.

Most of the challenge of learning Cocoa is learning the patterns and APIs of the framework. Doing so through a language bridge -- be it JSCocoa, MacRuby or PyObjC -- just adds a layer of complexity and impedance mismatch that will ultimately cost you time and incur bugs.

bbum