Filed under: Developer
JSCocoa 1.0, write Cocoa apps in Javascript
Do you want to write Cocoa applications, but happen to be handier with Javascript than with Objective-C? JSCocoa to the rescue! Similar in concept to RubyCocoa, JSCocoa provides a bridge between Webkit's JavascriptCore and Cocoa, allowing you to call C and Objective-C code, as well as build Javascript classes which inherit from Objective-C classes.
Visit the Google Code page for a quickstart and some syntax explanations. JSCocoa is open source and available for subversion checkout or direct download.

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Luigi193 said 5:15PM on 10-09-2008
What a strange combination...
Reply
Geoffrey Grosenbach said 8:00PM on 10-09-2008
I believe this is one of the 7 signs of the Apocalypse.
We can now write our Javascript apps in Objective-J and our Cocoa apps in Javascript.
Reply
Jash Sayani said 7:44AM on 10-10-2008
Wow!! This is cool !! I'll check it out!!
It means I dont need to learn Objective C to make iPhone apps! I can use JavaScript !!
Pretty cool !!
Reply
Vince said 11:19AM on 10-10-2008
So this would work on the iphone? I think there are a lot of javascript developers that would like to write apps for the iphone but don't want to learn cocoa. This is just what they need.
For this to take off, someone needs to release an xcode project of this applied to the iphone so javascript developers can just open it and start typing their .js code.
This is sorta like Jiggy for iphone but better. Would love to see any iphone samples people come up with.
Reply
Jonathan said 12:00PM on 10-10-2008
> So this would work on the iphone? I think there are a lot of javascript
> developers that would like to write apps for the iphone but don't want to > learn cocoa. This is just what they need.
You'd still have to learn Cocoa (the API). I think what you meant is that you won't have to learn Objective-C (the language). If you already know any C-like language, learning Objective-C is pretty easy. It always takes me much longer to become comfortable with an API than a language (assuming we're excluding BrainF*ck...)
Patrick Geiller said 10:04AM on 10-25-2008
I've uploaded a version working on the iPhone simulator :
http://code.google.com/p/jscocoa/source/browse/trunk/JSCocoa/iPhoneTest2/iPhoneMain.js
Check it out via svn.