- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
Eight Javascript Code Generators
Javascript code generation seems to be here to stay, with GWT taking roots and Ruby providing it's RJS Templates. It seems like it's time for a roundup of the little critters.
- RJS Templates for Ruby on Rails - Not quite a true Ruby->Javascript compiler as it seems to me, but cuts down on lots of coding.
- GWT - Java->Javascript. Everyone has heard of this beast. It's the 800 pound gorilla sucking the air out of the room for many other frameworks. Unique in that it provides a "hosted" mode that lets you debug in Java rather than Javascript.
- pyjamas - Python->Javascript. Open Source project inspired by GWT from which it borrows some ideas. Fairly active.
- Morfik - Java, Basic, C#, Object Pascal -> Javascript. Commercial offering from down under (Tazmania, dontcha know). Comes as an IDE that also provides server side development capability.
- Script# - C#->Javascript. No "hosted mode," so you are stuck debugging the generated Javascript. Runs out of Visual Studio. One man's effort right now, though that man apparently works for Microsoft. Unclear what the future of this project might be.
- Java2Script - Java->Javascript. Eclipse plugin. Predates GWT. Has a set of widgets based on SWT. Claims to allow you to convert your SWT based desktop apps into Javascript-based web apps. The demos (see screenshot of one of them) look promising.

- Scheme2Js - Scheme->Javascipt. If you feel the need to get that LISP-like syntax when you write code, here is the compiler for you. There's an article describing the inner workings for those interested.
- Haxe - Haxe->Javascript. Haxe is an OO language used to write web applications, among other things. You can also use it to write Flash and server side apps. All in one language. Didn't I just see a resume for a Haxe developer here somewhere?
I'd only feel comfortable using RJS and GWT at this point, since RJS doesn't really "hide" the Javascript all that much, and GWT provides the hosted mode. If you are debugging a complex, generated hunk of Javascript, you'd better be able to either make sense of the code (RJS) or go back to the source language (Java in GWT). I'm surprised the other tools don't think to provide some sort of high-level language debugging capability. I guess too few developers these days remember what it was like to debug assembly language generated from a compiler.
There's also the ParenScript LISP->Javascript compiler, but it, alas, seems to have gone the way of all single developer open source projects. Last, there is this article from Microsoft Research about the implementation of an Oberon to Javascript compiler. An interesting how-to of how such a thing can be built. Sorry, just the article, no download.
Topics: Ajax Development, C#, Code Generation, GWT, Javascript
Comments: 4 so far
Leave a comment
About Pathfinder
Recent
- Automated Deployments Rock
- Bandwidth profiling Flex projects and more with Charles
- iPhone SDK: UIViewController Testing & TDD
- Icons are evil; so are menus - unless you do them right
- The Truth About Designing For Security
- GWT, Gadgets and OpenSocial, Part 2
- Has Many has_many: A Refactoring Story
- The Hidden Power of Canvas
- Review of fixture_replacement2 plugin
- Chess Game Viewer in GWT
Archives
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006


You missed http://jsc.sourceforge.net
Comment by zproxy, Friday, September 15, 2006 @ 2:51 am
And also you missed: ST2JS (Smalltalk to Javascript)
http://www.squeaksource.com/ST2JS.htm
http://diegogomezdeck.blogspot.com/2006/07/st2js-traductor-de-smalltalk.html
Comment by Diego Gomez Deck, Sunday, September 17, 2006 @ 3:35 am
ParenScript (Lisp->JS) has a new home:
http://parenscript.org/
Comment by Dave Benjamin, Sunday, September 17, 2006 @ 3:56 am
Hi, one of my recent projects fits nicely in the category of JS code generators. It is Lisp front-end to JavaScript, offering compact Lisp reader, macroexpander and translator, all implemented in JavaScript:
http://www.geocities.com/dmitrynizh/lisp.html. This web page loads the translator into the browser and provides many demos.
Comment by Dmitry, Tuesday, October 23, 2007 @ 10:59 am