ST-JS : Strongly Typed JavaScript

Borrowing Java's syntax to write type-safe JavaScript

ST-JS is a Java-to-JavaScript transpiler that outputs readable, recognizable code. It lets you write code that uses the JavaScript and DOM APIs using Java's syntax and tooling.

ST-JS helps you manage the complexity of large dynamic single-page web applications by combining the strong, static typing of Java, with the wealth of existing libraries of JavaScript.

Example source code (Java)

StockData stockData = new StockData() { {
    last = 10.0;
    close = 2.0;
    stock = "ABC";
} };
$(that.row(stockData)).appendTo("table tbody");
that.stocks.push(stockData.stock);

Example generated code (JavaScript)

var stockData = {
    last : 10.0,
    close : 2.0,
    stock : "ABC"
};
$(that.row(stockData)).appendTo("table tbody");
that.stocks.push(stockData.stock);

ST-JS will help you with

Managing
complexity

Because of its strong typing and its static code analysis tools, Java makes it easier to handle complex projects than JavaScript.

In-browser
Debugging

ST-JS generates recognizable JavaScript code which is easy to debug in any browser without any additional tools or plugins.

Unit
testing

ST-JS includes a JUnit test runner that eases the creation of client side unit tests, and the integration of their results in your continuous build environment.

Staying
lightweight

ST-JS does not impose any client-side or server-side framework, not even its own. You are completely free to use whichever solution suits you best.

Self
documenting

Using existing JavaScript libraries becomes easier by using ST-JS bridges which give you hints about the types of all parameters and return types.
Fork me on GitHub