Today we’ll talking about Google Web Toolkit (a.k.a. GWT), a development toolkit for building and optimizing complex web applications.
Emerge and Package
First of all, you have to emerge ant package (remember to set up your USE flag).
# Su # Password: (your password) # emerge -av ant
Installation is really simple, just download it from:
once downloaded, unzip it and you have done!
Start a new project changing in your GWT directory and typing:
# su # Password: (your password) # chmod +x webAppCreator # ./webAppCreator -out MyWebApp com.mywork.mywebapp.MyWebApp
webAppCreator script accepts few parameters which are:
- -out Root Directory
- module name
Parameter -out generates all the directories tree in the root directory specified.
Instead, module name allow the earlier script to create a module with the chosen name.
Now, you should have created the directories tree of your web application. Something like following:
# Created directory MyWebApp/src # Created directory MyWebApp/war # Created directory MyWebApp/war/WEB-INF # Created directory MyWebApp/war/WEB-INF/lib # Created directory MyWebApp/src/com/google/gwt/sample/stockwatcher # Created directory MyWebApp/test/com/google/gwt/...
To run your application type:
# cd MyWebApp # ant devmode
This command start a local server used for development and debugging your application on localhost.
When you are in devmode, you can try you application without compiling anything on your default browser (remember to download “Google Web Toolkit plugins”, your browser should does it automatically).
# ant build
you have created your first web application with GWT. Congratulations!
The next time we’ll see how to build UI with GWT.
Following Article: [HOWTO] build user interface with GWT