简体   繁体   中英

Question related with GWT development mode

I've always thought that in development mode of GWT 2.0 developer plugin compiles my Java code into JavaScript to render it in the browser. But from the official GWT site we can read: "Thanks to the GWT developer plugin, there's no compiling of code to JavaScript to view it in the browser." So my question is: "What are all these widgets I see in the browser during this mode if they aren't JavaScript code?". Is it something connected with SWT or what, because I don't understand it.

Thanks in advance for any help!

When running in developer mode, it's actually java that is being run. The browser plugin allows the java side to manipulate various DOM/Javascript in the browser, so the need for compiling the code to javascript is not there.

The developer mode runs an embedded jetty server that the plugin connects to. The java code runs inside this jetty.

Only when you compile for your final deploy is the code actually turned into javascript.

By default javascript is generated from java code by compile-time.

GWT also has development mode, where it can detect changes of java code and compiles again the javascript code on the fly. That behavior can help development.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM