I tried out GWT 2.7 and was woundering what is the difference between -XjsInteropMode JS and -XjsInteropMode CLOSURE compiler flag?
-XjsInteropMode JS will output standard deobfuscated javascript accessors (method names match up directly, bean getter/setters map to simple property access). I assumed that using CLOSURE option will add Closure type annotations to the output to ensure two-way type safety between Gwt and Closure... But Goktug has replied on G+, saying:
-XjsInteropMode CLOSURE was used to generate export code in a way
that was assuming closure goog.provide(...) statements exists in
the beginning of js (potentially produced and prepended by a linker).
It was not useful for general public.
I'm using past tense because the option is now removed from the trunk.
Anways, if you are interested in Closure with Gwt, the video is not up yet, but Ray Cromwell's talk about Google Inbox mentions how they support highly optimized, fast compilation of Gwt -> Closure Friendly JS -> Minified obfuscated JS.
When the video is up, check it out here: http://gwtcreate.com/videos/index.html Until then, here are the slides: https://drive.google.com/a/wetheinter.net/file/d/0B3ktS-w9vr8IS2ZwQkw3WVRVeXc/view
Finally, Ray's talk specifically about Js Interop: https://docs.google.com/a/wetheinter.net/file/d/0ByS1wxINeBWjeGYxbkJpamxFZ28/edit
Note that there is also a video for that talk pending. It's very good. You should watch them both when they are uploaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With