Hosted versus Web Mode
While developing and debugging your application, you'll be using GWT in hosted mode. When in production however, your application will be running in web mode. Think of hosted mode as training wheels for your GWT program. It's a hybrid environment unique to GWT that lets you run and debug the real Java code, while still inside a browser.
The simplest way to launch hosted mode is to run the script file created by applicationCreator. In the example, we called the project "GWTFlow," so the script to run hosted mode is called "GWTFlow-shell." This brings up the GWT development shell, which then starts your program in hosted mode inside an embedded web browser. Or, using your IDE to start the shell, you can set breakpoints, examine variables, and single step through your application just like any other Java program. A good plug-in (such as GWT Designer for Eclipse) can make this task easier, along with providing extra benefits such as WYSIWYG user interface creation.
After you've debugged and unit tested your code, the next step is to compile it into a form that can be run inside a regular browser using the GWTFlow-compile script or equivalent. The GWT compiler translates your client-side code into JavaScript. It then combines your code with a JavaScript version of the GWT API in one big JavaScript file, which you load in the host HTML page. Actually, it creates several different browser- and language-specific versions. By default, the compiled JavaScript code is obfuscated and compressed to make it load and run as fast as possible for users. However, in the event that you encounter a bug that cannot be tracked down in hosted mode, you can tell GWT to create human-readable JavaScript that you can debug in web mode using a tool such as FireBug (www.ddj.com/development-tools/196802787).