What’s New in GWT?
David Chandler Google Web Toolkit Team Atlanta, GA USA [email protected]
1 Agenda
Why rich Web apps with GWT?
GWT Quickstart
Developer tools
GWT performance for your users
Building with GWT 2.12
2 GWT in 10 sec
Asynchronous JavaScript And XML++
3 GWT in 60 sec
Open source Java to JavaScript compiler
Lets you write rich Web apps in Java
Cross-browser just works (FireFox, Chrome, Safari, IE 6+)
Produces small, fast JavaScript
Easy (and efficient) RPC
Great for large projects / teams
4 Browser-Proof Your JS Code
IE
Firefox
Safari Chrome
Opera
5
5 No plugins required
Silverlight VML Flash
6
6 Can you find the bug?
Hint: JavaScript is a dynamic language
7
7 Catch errors at compile time
Java is a static language
8
8 Completion, refactoring...
9
9 Eating our own dogfood
+= AdSense, Maps, Docs, Groups...
10
10 Demos
Booked In
Typing race
11 Rich ecosystem www.gwtmarketplace.com
12 More ecosystem
Util: GIN, gwt-dnd, gwt-fx, gwt-comet, ... Widgets: EXT-GWT, Smart-GWT, ... Frameworks: Vaadin!
13 4+ years in review
May 2006 GWT 1.0 Launch at JavaOne
… …
Aug 2008 GWT 1.5 Java 5 language support
Apr 2009 GWT 1.7 Dedicated IE8 support
Fall 2009 GWT 2.0 UIBinder (XML template), runAsync()
Oct 2010 GWT 2.1 MVP, RequestFactory, Spring Roo
14
14 GWT delivers...
Productivity for developers - Language, IDEs, tools, libraries - People, ecosystem Performance for users - 'Perfect' caching - Whole program optimization
15
15 Developing with GWT
Develop - Google Plugin for Eclipse, GWT Designer, STS / Roo Debug - In Eclipse with dev mode browser plugin Optimize - SpeedTracer for GWT, App Engine, Spring Insight Deploy - Standard WAR or one-button push to App Engine
16 Google Plugin for Eclipse
17 Google Plugin for Eclipse
Easiest way to get latest GWT, GAE SDKs
Debug / Run / Optimize / Deploy
Wizards (new module, entry point, ClientBundle, UiBinder)
Quick fixes (auto-create RPC Async interface)
Run As | GWT JUnit Test
Maven integration via m2eclipse plugin
18 GWT Designer Java, ui.xml
19 GWT Designer & UiBinder
20 GWT Designer CSS Editor
21 Development cycle
Write Hit Code Refresh
Quick Test
22
22 Demo
Dev mode
Set breakpoint
23 How dev mode works
A real browser
Web Server Code Server
Java Virtual Machine
Duke, the Java mascot Copyright © Sun Microsystems Inc., all rights reserved.
24
24 Debug in dev mode
25
25 Compile for Production
Source files:
Code, CSS, Images, Resources, … GWT Compiler
Your app running here. No plugins.
26
26 Optimize with Speed Tracer
27 Launch SpeedTracer From Chrome...
Or from Eclipse...
28 Server traces GAE, tcServer
29 One click deploy to GAE
30 Performance for your users
Latency • Perfect Caching
Number of • ClientBundle connections • data: URLs & MHTML Bandwidth packaging
Browser • Developer guided code Performance splitting
• Compiler optimizations
31
31 Perfect caching
index.html … ………… ………… ………… … … ……… ……………… … … … … … HTTP … ……