The most obvious place to start looking at what GWT provides is t he one tool that defines it. The GWT compiler's responsibility is to convert your Java code into JavaScript code, in much the same way the Java compiler compiles your Java code into bytecode. You compile your project by running the Java program
by com.google.gwt.dev.GWTComplier, passing it the location of your module definition file along with some other parameters. It will use the JRE emulation library to parse the code. A module is a set of related Java classes and files accompanied by a single configuration file. The module definition typically includes an entry point, which is a class that excutes when the application starts.
The compiler starts with the entry-point class, following dependencies required to compile the Java code. The GWT does not compile everything in the modules, it only includes what is being used.
When your code is compiled to JavaScript, it results in a different JavaScript file for each browser type and target locale. A bootstrap script, initially loaded by the browser , automatically pulls the correct file when the application is loaded. The benefit of this process is that the code loaded by the browser doesn't contain code it can't use.
by com.google.gwt.dev.GWTComplier, passing it the location of your module definition file along with some other parameters. It will use the JRE emulation library to parse the code. A module is a set of related Java classes and files accompanied by a single configuration file. The module definition typically includes an entry point, which is a class that excutes when the application starts.
The compiler starts with the entry-point class, following dependencies required to compile the Java code. The GWT does not compile everything in the modules, it only includes what is being used.
When your code is compiled to JavaScript, it results in a different JavaScript file for each browser type and target locale. A bootstrap script, initially loaded by the browser , automatically pulls the correct file when the application is loaded. The benefit of this process is that the code loaded by the browser doesn't contain code it can't use.
Comments
Post a Comment