external javascript library

130 views
Skip to first unread message

Paul Snom

unread,
Jan 17, 2018, 3:59:49 AM1/17/18
to GWT Users
I'm considering evaluating GWT to replace a Flex application, can someone tell me if in principal I can use external JavaScript libraries (the one i'm specifically conserned about is https://github.com/emilkm/amfjs) . basically I need to call java classes on a backend tomcat server to send and receive data. 

Thx

Jens

unread,
Jan 17, 2018, 4:32:09 AM1/17/18
to GWT Users
Yes, you can define Java APIs in GWT that directly call external JavaScript. GWT itself uses the same technique to emulate JRE classes and map them to JavaScript if possible (e.g. java.util.Date is mostly mapped to JavaScript Date).

In older GWT versions (below 2.8.x) the technique is called JSNI


but it's use is discouraged because future versions of GWT will not support it anymore. The replacement is called JsInterop and you can get an in-depth overview at



-- J.

Jens

unread,
Jan 17, 2018, 4:34:32 AM1/17/18
to GWT Users

but it's use is discouraged because future versions of GWT will not support it anymore. The replacement is called JsInterop and you can get an in-depth overview at


Just seen that the GWT homepage also has a short page about JsInterop: http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJsInterop.html

-- J.

foal

unread,
Jan 23, 2018, 12:09:32 PM1/23/18
to GWT Users
Hi,

You can find more examples with JsInterop on https://gwt.zeef.com/awesomegwt#block_104342_jsinterop-wrapper. It is a list of existing JsInterop wrapper with links to the sources on GitHub or Bitbucket.

Stas
Reply all
Reply to author
Forward
0 new messages