160 likes | 306 Views
Web Toolkit. Julie George & Ronald Lopez. Requirements. Java SDK version 1.5 or later Apache Ant is also necessary to run command line arguments Can use any Java IDE Download Google Web toolkit. Major Components. SDK contains the Java API libraries, compiler, and development server .
E N D
Web Toolkit Julie George & Ronald Lopez
Requirements • Java SDK version 1.5 or later • Apache Ant is also necessary to run command line arguments • Can use any Java IDE • Download Google Web toolkit
Major Components • SDK contains the Java API libraries, compiler, and development server. • GWT Designer: User friendly IDE (like .NET) for generating UI code (works on top of Eclipse) • Speed Tracer (Profiler Tool) • Plugin for Eclipse: Allows for easy deployment to Google’s app engine
Features • Compile your Java code into highly optimized JavaScript • Debug. • Run in multiple browsers. • GWT compiler performs optimization • -inliningmethods,dead code, optimize strings,split points in the code
How it works(write-debug-optimize-run) • unzip gwt-2.4.0.zip
How it works(write-debug-optimize-run) • webAppCreator -out MyWebAppcom.mycompany.mywebapp.MyWebApp
Run locally in development mode • cd MyWebApp/ • ant devmode
Files Created • ant build • Host page : Code executes in this html file.
Files Created • <entry-point class='com.mycompany.mywebapp.client.MyWebApp'/> • <!-- Specify the paths for translatable code --> • <source path='client'/> • <source path='shared'/>
Files Created • Deployment Descriptor
Scripts • Eclipse • Slide 10 Host page • Java source code
Communicating with the Server • Making Remote Procedure Calls (GWT RPC) • Retrieving JSON Data via HTTP • Making Cross-Site Requests for JSONP • Making Asynchronous Calls • GWT RPC is a mechanism for passing Java objects to and from a server over standard HTTP
Deployment • Ant Build or R-click project->Google->GWT compile • Files are output to the WAR folder in your project • Deploy to Google’s App Engine • Plugin • Command line program
Then End… Questions?