SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
2.
Welcome
State of the Community
State of GWT
GWT 3.0 and Beyond
3.
State of the Community
•
700+ attending GWT.create
•
3x increase in external contributions (patches)
•
Thousands of Googlers using it
•
~100k users of SDK
7.
Google Sheets
•
First in a new generation of hybrid apps
•
Shares logic between Server, Android, Web, and iOS
via Java code.
•
Cross compiled with GWT and j2objc
•
Web UI marries Closure Compiler JS and shared Java
via GWT code.
•
Android and iOS UIs marry Java and Obj-C UI with
shared Java.
8.
Google Sheets
•
Much faster than predecessor
•
Larger Sheets
•
Local client formula evaluation
•
Offline
•
Faster, smoother, scrolling
•
Supported on all 3 platforms at once.
9.
State of GWT
•
GWT 2.6
•
•
Reduced Code Size
•
•
Java 7
Better CodeSplitter
Ambitious plan for upcoming improvements
10.
What’s Happened Since
2006
•
JS a lot faster
•
Browsers much more capable
•
Less incompatibility between latest versions
21.
Js Library Sample
!
function MyClass() {
this.answer = 42;
}
!
MyClass.prototype.whatIsTheAnswer = function() {
return "The answer to life, the universe, and
everything is ..." + this.answer;
}
!
22.
Without JsInterface
!
interface MyClass {
int getAnswer();
String whatIsTheAnswer();
}
!
final class MyClassImpl extends JavaScriptObject
implements MyClass {
!
}
!
!
!
public native int getAnswer() /*-{
return this.answer;
}-*/;
public native String whatIsTheAnswer() /*-{
return this.whatIsTheAnswer();
}-*/;
23.
With JsInterface
@JsInterface
interface MyClass {
@JsProperty
int getAnswer();
String whatIsTheAnswer();
}
!
!
!
!
24.
Zero Work Interop
Could we make this even easier?
25.
Zero Work Interop
•
Closure Compiler annotated Javascript
•
Typescript annotated JavaScript
•
Drop in and go
•
Automatically generate JsInterface
declarations from typed JS
27.
Using External JS Libraries
•
Must be un-minified to have predictable symbols
•
Live in separate JS execution context
•
Dead or Unused library code not removable
28.
The World Today
Host Html Page
GWT Module IFrame
<script src=“angular.js”>
GWT Source
GWT
Compiler
Compiled JS
29.
Radically Better Interop
•
Combine JS and Java as single source tree
•
Globally Optimize Together
•
Output single, optimized application
30.
The World Tomorrow
Host Html Page
GWT Module IFrame
<script src=“angular.js”>
GWT Source
GWT
Compiler
Compiled JS
31.
The World Tomorrow
GWT Module IFrame
<script src=“angular.js”>
GWT Source
GWT
Compiler
Closure
Compiler
Compiled JS
32.
Radically Better Interop
•
Javascript library subject to optimizations
together with Java code
•
Smallest code size possible
•
Type-checking between JS and Java
33.
Web Components
•
Web Native Templates
•
Custom HTML Elements
•
Encapsulated DOM and CSS
•
•
(Shadow DOM and Scoped CSS)
Kind of like runtime native version of UiBinder
34.
Web Components
•
Ecosystem of reusable widgets/components
•
New Interop will make them easy to consume
•
Future of where Web authoring is headed
•
We want to be ready for it
35.
Fire and Forget CodeSpliting
•
CodeSplitter allows code to be not be loaded
until needed
•
Reduces initial download size
•
Shared code “leftovers fragment” inhibits
benefits
36.
Current Problem
•
Tedious
•
Brittle
•
Lack of Control
37.
Next-Gen CodeSplitter
•
Choose to force a split point manually
•
Automatically merge fragments
•
Multiple leftover fragments