Web Toolkit
description
Transcript of Web Toolkit
![Page 1: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/1.jpg)
1
Web ToolkitJulie George & Ronald Lopez
![Page 2: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/2.jpg)
Requirements
Java SDK version 1.5 or laterApache Ant is also necessary to run command
line arguments
Can use any Java IDEDownload Google Web toolkit
![Page 3: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/3.jpg)
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
![Page 4: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/4.jpg)
4
Features
Compile your Java code into highly optimized JavaScript
Debug.Run in multiple browsers.GWT compiler performs optimization– -inlining methods,dead code, optimize strings,split
points in the code
![Page 5: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/5.jpg)
5
How it works(write-debug-optimize-run)
1. unzip gwt-2.4.0.zip
![Page 6: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/6.jpg)
6
How it works(write-debug-optimize-run)
webAppCreator -out MyWebApp com.mycompany.mywebapp.MyWebApp
![Page 7: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/7.jpg)
Run locally in development mode
cd MyWebApp/ ant devmode
![Page 8: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/8.jpg)
Run locally in development mode
![Page 9: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/9.jpg)
Files Created
ant build
Host page : Code executes in this html file.
![Page 10: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/10.jpg)
Files Created
<entry-point class='com.mycompany.mywebapp.client.MyWebApp'/>
<!-- Specify the paths for translatable code --> <source path='client'/> <source path='shared'/>
![Page 11: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/11.jpg)
Files Created
Deployment Descriptor
![Page 12: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/12.jpg)
Files Created
![Page 13: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/13.jpg)
ScriptsEclipseSlide 10 Host page
Java source code
![Page 14: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/14.jpg)
Communicating with the Server
Making Remote Procedure Calls (GWT RPC)Retrieving JSON Data via HTTPMaking Cross-Site Requests for JSONPMaking Asynchronous Calls
– GWT RPC is a mechanism for passing Java objects to and from a server over standard HTTP
![Page 15: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/15.jpg)
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
![Page 16: Web Toolkit](https://reader036.fdocuments.us/reader036/viewer/2022062812/568162a2550346895dd31c3a/html5/thumbnails/16.jpg)
QUESTIONS?Then End…