1 / 14

Google Web Toolkit

Google Web Toolkit. What it offers us. What is it?. Java to Javascript “compiler” Web browser emulator Java and Javascript libraries Complete “AJAX” programming environment Used in Google Calendar, Google Mashup Editor, etc. Advantages over Flash. We already know Java.

enid
Download Presentation

Google Web Toolkit

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Google Web Toolkit What it offers us

  2. What is it? • Java to Javascript “compiler” • Web browser emulator • Java and Javascript libraries • Complete “AJAX” programming environment • Used in Google Calendar, Google Mashup Editor, etc.

  3. Advantages over Flash • We already know Java. • Free (both in “freedom” and “beer” senses) to develop, free to deploy. • No plugins to manage, uses browser’s built-in Javascript.

  4. Advantages over other AJAX toolkits • Don’t need to know Javascript. • Browser dependencies handled automagically. • Debug in Java using Eclipse or other Java debugger. • Active Google Code developer community.

  5. Other nifty features • Supports Eclipse, Ant, Junit. • Uses any Servlet engine you like, such as Tomcat or Jetty - builds .war file for deployment.

  6. Now the down side • The client side uses a subset of the JRE library. • The client side only supports Java 1.4 • Can’t do “flashy” stuff. • It’s not Swing. • You probably need to know a bit of CSS. • Had to write my own “pseudo Server Push”.

  7. Client Side Coding • Keep the Client Side as small as possible. • “Render” Playlist object to an array of Strings on the server instead of sending the whole class. • Keep whole lists (like Playlists) on the server, send a page full at a time to the Client on demand. • GWT AbstractImagePrototype a mixed blessing.

  8. The first “A” in AJAX is “Asynchronous” • Server calls are all asynchronous. • Javascript is single threaded, so process callbacks as quickly as possible. • Slight quirk - you define an Interface that extends “RemoteInterface” for the server side, and another interface for the client.

  9. Building User Interfaces • Very similar to Swing • Widgets and Panels. • Panels perform layout for Widgets. • You can subclass widgets. • Your code can set the CSS style name for a component.

  10. Before we look at what I did Let’s look at some good stuff.

  11. Goals of my demo • Prove that I could get information out of the database and display it on a web browser. • Prove I could have dynamic content that updated/added/removed automatically. • Prove that the server could send Java objects to the client. • Prove that I could debug the client code in Java.

  12. Secondary Goals • To not have to learn Javascript • To use as little CSS as possible.

  13. Before we look at the real app and code… • I wasn’t trying to make it pretty, just determine if things were possible or not. • I suck at drawing programs. • This laptop is old and slow.

  14. Mission Accomplished!

More Related