开发者

Question related with GWT development mode

I've always thought t开发者_StackOverflow社区hat 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜