Transcript
Page 1: Google Web Toolkit (JUG Latvia)

Google Web Toolkitwww.jug.lv

Page 2: Google Web Toolkit (JUG Latvia)

AgendaIntroductionWhy is unique?Why needed?Who uses?

Page 3: Google Web Toolkit (JUG Latvia)

PollWho knows what GWT is?Who tried that?Who is using in projects?

Page 4: Google Web Toolkit (JUG Latvia)

Compared to Other FrameworksStrutsJSFApache WicketZKSpring MVCRails...

Page 5: Google Web Toolkit (JUG Latvia)

The RealityNot really the same…GWT is a Rich Client Framework Similar to hand-written JavaScript client

Page 6: Google Web Toolkit (JUG Latvia)

ArchitectureStandalone clientHTTP/Ajax communication

Rich Client (JavaScript)

Java Backend (REST, RPC)

HTTP

http://gwt.google.com/samples/Mail/Mail.html

Page 7: Google Web Toolkit (JUG Latvia)

The EssenceSwing-like development model

Cross-browser Java to JavaScript Compiler

Page 8: Google Web Toolkit (JUG Latvia)

Statement

GWT is one of the best tools for webapp scalability

Page 9: Google Web Toolkit (JUG Latvia)

GWT Performance Tricks

trafficmemor

ycpu

Page 10: Google Web Toolkit (JUG Latvia)

GWT CompilerTranslationOptimizationCompression Obfuscation

Page 11: Google Web Toolkit (JUG Latvia)

Deferred BindingSeparate JS for each browser

Byte- code

Java Script

Java Script

Java Script

Java Code

javac gwtc

Page 12: Google Web Toolkit (JUG Latvia)

Bootstrap Sequenceindex.html (small, temporary cache)nocache.js (small)cache.js (large, eternal cache)

Page 13: Google Web Toolkit (JUG Latvia)

Code SplittingSingle JS is too large

Split Points

Loads JS in partsHTTP

Main.java

One.java Two.java Three.java

Page 14: Google Web Toolkit (JUG Latvia)

No Page ReloadsAnchors-basedSingle page applicationNo refreshes (no HTTP traffic)

http://www.site.com/#index

http://www.site.com/#search

http://www.site.com/#resource/1?option=Y

Page 15: Google Web Toolkit (JUG Latvia)

Async ModelSingle thread

Callbacks

Page 16: Google Web Toolkit (JUG Latvia)

RPC SerializationDirect-EvalSimpleTODO Give snippets

Page 17: Google Web Toolkit (JUG Latvia)

Resource BundlesImagesText resourcesCSS

Page 18: Google Web Toolkit (JUG Latvia)

Summary

Page 19: Google Web Toolkit (JUG Latvia)

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...

Page 20: Google Web Toolkit (JUG Latvia)

ConclusionsVery powerful yet complicated toolCache everythingCompress everythingLess HTTP requests

Page 21: Google Web Toolkit (JUG Latvia)

FutureVersion 2.1 is out now (October 29th)

Page 22: Google Web Toolkit (JUG Latvia)

Questionshttp://code.google.com/webtoolkit/

Page 23: Google Web Toolkit (JUG Latvia)

About the SpeakerDmitry Buzdin

Agile software developer working with Java since 2005Based in C.T.CoReach me at [email protected]


Top Related