Google Web ToolkitBy
Kaushik Sahoo
Mindfire SolutionsDate: Oct 30, 2013
What is GWT?
A set of tools for building AJAX apps in the Java language
Write, run, test, and debug in Java
Is it a compiler?
Why? Handwritten Scripts vs GWT
Poor Usability
• history, bookmarks
Poor Tool Support• Limited IDE support
• Debugging too often boils down to window.alert()
• Profilers? Findbugs?
Why? Handwritten Scripts vs GWT
Hard to test
• JUnit support for GWT
Quality Risks
• New categories of runtime-only bugs (e.g. spelling bugs)
1047: x.compnent = getValue("x");
• Poor JS reuse model encourages "from scratch" or copy/paste
Why? Handwritten Scripts vs GWT
Hard for large teams to work on the same code base
Auto Complete Browser Compatibility
Remember our Dear friend IE !!!
All these points start to matter a lot for big projects
What is the Solution?
Can Java be used for client-side scripting?More or less, the impossible…
Unless you translate Java into JavaScript
GWT Features
HTML 5 support Mobile Web support Cross-browser? An abstract DOM class History class - Demo RPC Widgets JSNI Presentation - CSS
Widgets and Panels
Demos at Showcase
RPC
GWT supports various ways to communicate with the server JSON, XML etc.
But a pure Java RPC interface would be awesome. Isn't it?
JSNI
JavaScript Native Interfacepublic static native void alert(String msg) /*-{$wnd.alert(msg);
}-*/;
Things to know...
Technology second, users first.
It isn't Java vs Javascript or Java vs everything else.
Download exactly what you need.
GWT Team slogan: the bling is on the inside
Hosted mode
Question and Answer
Thank you
Top Related