-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
93 lines (76 loc) · 4.34 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
layout: base
title: Strongly Typed JavaScript
---
<div class="topHighlight">
<div class="container_12">
<div class="grid_9">
<h1>ST-JS : Strongly Typed JavaScript</h1>
<h2>Borrowing Java's syntax to write type-safe JavaScript</h2>
<p class="intro">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.</p>
<p class="intro">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.</p>
</div>
<div class="grid_3">
<ul class="menu">
<li><a href="faq.html">FAQ</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="tutorial.html">Tutorial</a></li>
<li><a href="reference.html">Reference</a></li>
<li><a href="bridges.html">Bridges</a></li>
<li><a href="changelog.html">Changelog</a></li>
<li><a href="contributing.html">Contributing</a></li>
<li><a href="http://axcraciun.wordpress.com/">Blog</a></li>
</ul>
</div>
<div class="clear"></div>
<div class="prefix_1 grid_5">
<p class="code java">
<span class="title">Example source code (Java)</span><br><br>
<span class="type">StockData</span> <span class="variable">stockData</span> = <span class="keyword">new</span> <span class="type">StockData</span>() { {<br>
<span class="variable">last</span> = <span class="litteral">10.0</span>;<br>
<span class="variable">close</span> = <span class="litteral">2.0</span>;<br>
<span class="variable">stock</span> = <span class="litteral">"ABC"</span>;<br>
} };<br>
<span class="function">$</span>(<span class="variable">that</span>.<span class="function">row</span>(<span class="variable">stockData</span>)).<span class="function">appendTo</span>(<span class="litteral">"table tbody"</span>);<br>
<span class="variable">that</span>.<span class="variable">stocks</span>.<span class="function">push</span>(<span class="variable">stockData</span>.<span class="variable">stock</span>);
</p>
</div>
<div class="grid_5 suffix_1">
<p class="code javascript">
<span class="title">Example generated code (JavaScript)</span><br><br>
<span class="keyword">var</span> <span class="variable">stockData</span> = {<br>
<span class="variable">last</span> : <span class="litteral">10.0</span>,<br>
<span class="variable">close</span> : <span class="litteral">2.0</span>,<br>
<span class="variable">stock</span> : <span class="litteral">"ABC"</span><br>
};<br>
<span class="function">$</span>(<span class="variable">that</span>.<span class="function">row</span>(<span class="variable">stockData</span>)).<span class="function">appendTo</span>(<span class="litteral">"table tbody"</span>);<br>
<span class="variable">that</span>.<span class="variable">stocks</span>.<span class="function">push</span>(<span class="variable">stockData</span>.<span class="variable">stock</span>);
</p>
</div>
</div>
</div>
<div class="container_12">
<div class="grid_12 messagesHeader">
<h2>ST-JS will help you with</h2>
</div>
<div class="prefix_1 grid_2 messageItem">
<h3>Managing<br>complexity</h3>
Because of its strong typing and its static code analysis tools, Java makes it easier to handle complex projects than JavaScript.
</div>
<div class="grid_2 messageItem">
<h3>In-browser<br>Debugging</h3>
ST-JS generates recognizable JavaScript code which is easy to debug in any browser without any additional tools or plugins.
</div>
<div class="grid_2 messageItem">
<h3>Unit<br>testing</h3>
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.
</div>
<div class="grid_2 messageItem">
<h3>Staying<br>lightweight</h3>
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.
</div>
<div class="grid_2 suffix_1 messageItem">
<h3>Self<br>documenting</h3>
Using existing JavaScript libraries becomes easier by using ST-JS bridges which give you hints about the types of all parameters and return types.
</div>
</div>