Lavixu
Lavixu

Reputation: 1398

How does GWT Plugin work?

It is documented that GWT converts java code ( a few extensions not supported ) to javascript which gets rendered. When does this conversion happen? I want to know the steps and the agents involved at each step. Why do we need GWT plugins for each browser? What part of the conversion is handled by the library and what part is handled by the plugin?

I have read a lot of tutorials but this point is still vague.

Upvotes: 1

Views: 196

Answers (1)

mlkammer
mlkammer

Reputation: 200

It is important to understand about GWT that there's a big difference between production mode and development mode. You write Java code and for deployment, the GWT compiler compiles it to JavaScript which is then interpreted by the browser. So, in production, the conversion happens only one time, before you deploy your web app to a server. And in this case, no browser plugin is needed because modern browsers can interpret JavaScript without any help.

In development mode however, things are different. The Java code is interpreted by the GWT browser plugin directly, without an explicit compilation from Java into JavaScript. So you only need a browser plugin in development mode.

And then there's super dev mode, which is different from the scenarios above. This page explains it all.

Upvotes: 2

Related Questions