GWT DevMode Options and Concepts

I just read the GWT manual for compiling and debugging and asked a few similar questions:

  • What is a usage example for the -whitelist and -blacklist DevMode and why are they not available for production mode?
  • Difference between DevMode and HostedMode ? Use cases for both?
  • What does "extra" stuff happen when you specify the -extra flag?
  • What is -workDir and why should it be written? What is written there? What can I use it for?
  • Is the embedded Jetty instance the same as for the code server? If not, what is the difference?
  • Where is the compilation history report ( soyc ) soyc and how to set up this location?

These questions are so closely related that I thought it would be better to ask them all, rather than spamming SO with 6 different micro-questions. Thanks in advance!

+4
source share
1 answer
  • -whitelist and -blacklist are never actually used. They are left in the previous mode, in which the browser widget is built-in (and it can manage policies of the same origin), and not be built into the browser through the plug-in.

  • HostedMode is currently the same as DevMode . It exists only for backward compatibility (see above)

  • property files for all of your Messages and Constants for all of your locales (assuming you configured @Generate for those) to make loading I18N easier, compile the report — if you also pass -compileReport , CSS maps for obfuscating CssResource class CssResource and logs GWT-RPC serialization policies (which classes were included / excluded and why).

  • -workDir is where GWT writes most of its temporary data (not all, some things go to the OS temporary folder, configured with the system property -Djava.io.tmpdir= or to the .gwt-unitCache ), the system property -Dgwt.persistentunitcachedir= ). When you perform distributed assemblies , workDir must be used by all machines (either shared on the network or copying files).

  • In DevMode, the embedded Jetty server launches your webapp (your server code and your static resources) from the -war folder (the default is war/ in the current directory). The code server is the client code. In DevMode, the code server uses a raw TCP connection to communicate with the plugin located in your browser; in SuperDevMode, the code server is an instance of Jetty that serves JavaScript, compiled (almost) on the fly, however it does not host your webapp.

  • See above # 3 and http://www.gwtproject.org/doc/latest/DevGuideCompileReport.html

By the way, the GWT project now has a new home: http://www.gwtproject.org

+3
source

Source: https://habr.com/ru/post/1484751/


All Articles