Google Web Toolkit
www.jug.lv
Agenda
Introduction
Why is unique?
Why needed?
Who uses?
Poll
Who knows what GWT is?
Who tried that?
Who is using in projects?
Compared to Other Frameworks
Struts
JSF
Apache Wicket
ZK
Spring MVC
Rails
...
The Reality
Not really the same…
GWT is a Rich Client Framework
Similar to hand-written JavaScript client
Architecture
Standalone client
HTTP/Ajax communication
Rich Client (JavaScript)
Java Backend (REST, RPC)
HTTP
http://gwt.google.com/samples/Mail/Mail.html
The Essence
Swing-like development model
Cross-browser Java to JavaScript Compiler
Statement
GWT is one of the best tools for webapp
scalability
GWT Performance Tricks
trafficmemorycpu
GWT Compiler
Translation
Optimization
Compression
Obfuscation
Deferred Binding
Separate JS for each browser
Byte-
code
Java Script
Java Script
Java Script
Java
Code
javac gwtc
Bootstrap Sequence
index.html (small, temporary cache)
nocache.js (small)
cache.js (large, eternal cache)
Code Splitting
Single JS is too large
Split Points
Loads JS in parts
HTTP
Main.java
One.java Two.java Three.java
No Page Reloads
Anchors-based
Single page application
No refreshes (no HTTP traffic)
http://www.site.com/#index
http://www.site.com/#search
http://www.site.com/#resource/1?option=Y
Async Model
Single thread
Callbacks
RPC Serialization
Direct-Eval
Simple
TODO Give snippets
Resource Bundles
Images
Text resources
CSS
Summary
GWT Pros and Cons
+ Full control
+ Performance and scalability
+ Portability
+ Development Speed
- Non-trivial development model
- Plenty of design/architecture options
- IE6 and IE7 are still out there...
Conclusions
Very powerful yet complicated tool
Cache everything
Compress everything
Less HTTP requests
Future
Version 2.1 is out now (October 29th)
Questions
http://code.google.com/webtoolkit/
About the Speaker
Dmitry Buzdin
Agile software developer working with Java since 2005
Based in C.T.Co
Reach me at buzdin@gmail.com

Google Web Toolkit (JUG Latvia)