GWT 2.0 as general purpose Java to Javascript compiler

18 views
Skip to first unread message

sgriffins

unread,
Feb 26, 2010, 7:01:23 PM2/26/10
to Google Web Toolkit
Hi there,
I was wondering if its possible to use GWT 2.0 as a general purpose
java to Javascript compiler. A handful of new mobile technologies such
as phonegap and titanium allow development in Javascript and
deployment to iPhone/android/nokia, using platform specific Javascript-
LanguageX bridges.

Unfortunately these cross-platform mobile platforms offer poor testing
and development tools. It would be great to write strongly typed GWT
code using JSNI and JS Overlays, in Ecilpse, Unit tested, well
architected, producing a single JS file (sso linker?) that can be re-
used in phonegap or titanium and deployed to titanium or phonegap.

I tried a hello world sample with a sso linker that produced a single
permutation. But it did not fly in titanium because the generated GWT
bootstrap code needs there to be a DOM and a window object, which is
not the case.

Is it possible to configure the linker/compiler to skip any bootstrap
steps. I just need some GWT magic to compile Java to javascript
without any HTML DOM/browser dependencies/usage.

Thanks.

Fabiano

unread,
Feb 27, 2010, 2:10:10 AM2/27/10
to Google Web Toolkit
I ->suppose<- you need cross site linker, the magic words are "cross
site linker" or "xs linker", let's serach into this forum and into GWT
ocumentation.
there are few rows into the documentation too (this feature is not so
documented) .
+ by compiling with xs linker you are going to loose few features.
(split load?(don't remind the exact name)
This linker creates a javascript inside the current context, no need
of iframe etc...
This is way to solve cross site application loading but in your case
could solve your issue.
Reply all
Reply to author
Forward
0 new messages