SlideShare a Scribd company logo
1 of 22
Download to read offline
GWT Reloaded
Building complex browser-based applications in Java 8
© 2016 by Marcin Szałomski
Topics
❏ What is GWT and who stands behind it?
❏ GWT retrospection (2006-2016)
❏ The Future of GWT
❏ What about the popular JS frameworks?
❏ Why do we still need GWT?
❏ Who and how is using GWT?
❏ How to use GWT?
❏ Errai Framework - Java EE In The Browser.
❏ Useful links
Google Web Toolkit? Still Google?
It was originally created and developed by Google.
Now? Google - member of the GWT Open Source Project.
So who’s the boss? (late 2011-...)
GWT Steering committee : Google, Vaadin, Sencha, RedHat, Arcbees,
Bizo, Jetbrains, Thomas Broyer and Colin Alworth.
(to ensure that no particular individual, group or organization can gain
control over the project)
What’s changed? The project gets better!
Java to JavaScript compiler.
❏ open-source, completely free,
❏ the active community,
❏ still developed and maintained
❏ lots of tools and libs around
❏ GWT.create, GWTcon ,
conferences,
❏ used by thousands of
developers around the world,
❏ ...
GWT?
Development toolkit for building
and optimizing complex browser-
based applications. Its goal is to
enable productive development
of high-performance web
applications without the
developer having to be an expert
in browser quirks,
XMLHttpRequest, and JavaScript.
GWT in the Past
❏ ...was born in Google (2006)
❏ graduated to open source in
late 2011 (steering committee)
❏ in 2006 browsers and
JavaScript were far from
standards (jQuery just
announced for the first time!)
❏ almost lack of HQ alternative,
❏ The goal: browsers tricks
hidden for developers
Ok, but the web has changed over
the past decade. We have now a
lot of awesome front-end
frameworks like: Angular, Polymer
or React.
Do we still
need GWT?
Why do we still need GWT? [1 of 2]
JavaScript became lingua franca
of front-end applications.
But developers need better tools.
OK, we have: ES6+, CoffeeScript,
TypeScript, JSweet, Dart, …
Developers need stronger typing!
Weakly typed language may
produce unpredictable results!
Future of JavaScript?
❏ There was JavaScript in 1996,
❏ There was JavaScript in 2006
❏ There is JavaScript in 2016
❏ … who knows…
❏ ...the future? WebAssembly?
GWT alternative? Kotlin.js ,
Scala.js , Ceylon and more …
even other tools for Java.
such as the importance of the JavaScript has grown each year
Why do we need stronger typing?
Is JavaScript so bad? What about the EcmaScript 6 or TypeScript?
ES6 doesn’t support for types.
TypeScript offers support for types, but doesn’t support strong type system.
Strong typing guarantees your code is free of silly mistakes.
No more mixing up strings or numbers, forgetting what keys an object has,
or worrying about typos in your method names.
It also provides easy and reliable refactoring and reliable code completion.
* - This nice explanation has been taken from the Scala.JS site.
Why do we still need GWT? [2 of 2]
Principles: DRY and DIE! Reuse, reuse, reuse, ...!
Cross-platform approach. One Java code base, various platforms.
… mobile web, native targets like mobile devices
… and perhaps even the IOT... To reuse even Java Backend code …
...JAVA, JAVA, ...
...for native consider also:
Titanium4J (GWT),
Intel Multi-OS Engine or
Codename One...
Reuse: business logic,
model, validation, etc.
Titanium4J or
Codename One helps
you even with the UI.
More tech:
❏ JSInterop: @JSType and
@JSProperty
instead of JSNI or JSO,
❏ Super Dev Mode (edit-refresh),
❏ GSS Support ,
❏ J2CL (Java-to-CLosure aka
Jackal) - Closure Compiler ,
❏ Elemental 2.0, …
GWT in the Future // GWT 3.0
Simple summary:
❏ 2.8.0 beta already available,
❏ 3.0 in development,
What has changed:
❏ reinvented interoperability
with JavaScript,
❏ new improved compiler,
❏ Java 8 support!
For more please see this: presentation and the article .
Additional
references:
GWT and Java 8
GWT 2.8 allows us to enjoy Java 8. Further benefits are eg. FRP (Reactive).
Actually it's nothing new, but lot of projects stucked in the previous GWT
version. The reason to switch? Please see this presentation (starting from
slide #20). One of the key features - lambda expressions:
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
$(image).css("display", "block");
}
});
Scheduler.get().scheduleDeferred(() -> $(image).css("display", "block"));
JAVA 7
JAVA 8
Who is using GWT?
GWT is used by many products at
Google, including:
AdWords, AdSense, Flights, Hotel
Finder, Offers, Wallet, Blogger,
Google Sheets, Parts of Maps and
Google Inbox (May 28, 2015 -
officially opened).
One App, Many Platforms
Java code reused ➤ Inbox Web uses GWT JsInterop ➤ Inbox iOS uses J2ObjC
Recently Google announced that has rewritten the AdWords UI using Dart .
So what does it mean for GWT? I’ve compared both after reading the
interview with primary technical lead: Explained with the details here .
[x] Dart [x] GWT transpiles well to Javascript
[_] Dart [x] GWT switch tech stacks easily
[_] Dart [x] GWT stronger type checking
[_] Dart [x] GWT fast edit refresh
[x] Dart [x] GWT new js interop
[x] Dart [x] GWT being terse
[x] Dart [x] GWT frameworks available
[_] Dart [x] GWT native apps
What about the AdWords?
Who else is using GWT?
Please find “The Future of GWT
Report 2015” here .
Mostly for large-scale web
applications like:
❏ Internal and External business
applications,
❏ Content-rich websites…
Why?
❏ maintainability of the code is
important
How to use GWT?
Presentation - building Polymer
Elements powered app with
Vaadin Framework: .
Presentation introducing Errai
Framework .
Btw. it’s worth mentioning that
GWT can be also used to create
non browser based apps using
Node.js, since it’s Java to JS
compiler.
Errai Framework?
❏ building full-stack web apps,
❏ type-safe and declarative,
❏ “It's better to have less code
that clearly expresses intent”
❏ convention over configuration,
❏ Share code between the client
and the server,
❏ DRY: Reuse your data model,
validation and business logic,...
boilerplate is bad
Errai Framework
❏ Client-side dependency
injection (consistent with CDI)
❏ Client-side templating
❏ 2-way data-binding
❏ Dynamic runtime module
support (using JsInterop)
❏ qualifier annotations to
determine what dependencies
a bean satisfies,
❏ Constructor field and setter
injections,
❏ More CDI and EJB features:
@Alternative, @Specializes,
@Produces, scopes, CDI
Events, JPA, ...
❏ injecting native JavaScript
objects into IoC beans with JS
interop,
❏ Support for native DOM-based
UI,
❏ Support for GWT 2.8 + Java 8.
… loose coupling, easy reuse, …
Errai - how to cook with it (Errai UI example)
❏ bind Java class elements to
elements in an HTML template,
❏ template files can be HTML
fragments or full pages,
❏ the HTML file is the template,
❏ the Java class is a templated
bean.
❏ data fields can be @Bound to
the model and automatically
updated.
MyForm.html
Errai - Data Binding
The name and dob fields are @Bound
They are kept in sync by binder.
This class is @Bindable with two properties
Going the other direction
More Errai examples?
Presentation introducing Errai
Framework .
Getting started
Reference
Please watch this 6 minutes
movie showing Errai in action
(TODO List app creating).
(referers to the quite old Errai version but it’s still worth watching)
GWTP (video), Tessell (video),
MVP4G, and more …
How about the UI?
GWT Polymer (tutor, showcase),
Vaadin (demo), Sencha GXT (doc),
native apps in Titanium4J (videos)
GWTMaterialDesign (demo #1,
demo #2, demo #3, demo #4),
Smart GWT (showcase),
GwtBootstrap3 (demo), jqm4gwt
(jQuery Mobile showcase), ...
What if not Errai?
GWT 3 way of using UI. Widgets
will be depreciated. Using the
new JSInterop and Elemental it
should be now possible to simply
use any 3rd
party JavaScript UI
library or integrate with
frameworks like React/Redux
or Angular .
GWT related links
❏ Conference slides
❏ Sources
❏ Some videos:
GWT Meet-up 2015
GWT.create 2015
❏ GWT Project site
Interesting articles:
❏ Build Powerful JavaScript
Front Ends Using Java
❏ What happened in 2015/2016
for GWT ?
❏ Java mobile tech overview

More Related Content

What's hot

Web components with java by Haijian Wang
Web components with java by Haijian WangWeb components with java by Haijian Wang
Web components with java by Haijian WangGWTcon
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java DevelopersJoonas Lehtinen
 
GWT + Gears : The browser is the platform
GWT + Gears : The browser is the platformGWT + Gears : The browser is the platform
GWT + Gears : The browser is the platformDidier Girard
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13Fred Sauer
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Matt Raible
 
Vaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIVaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIPeter Lehto
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitAriya Hidayat
 
Vaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web ComponentsVaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web ComponentsPeter Lehto
 
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019Matt Raible
 
A Gentle Introduction to Angular Schematics - Angular SF 2019
A Gentle Introduction to Angular Schematics - Angular SF 2019A Gentle Introduction to Angular Schematics - Angular SF 2019
A Gentle Introduction to Angular Schematics - Angular SF 2019Matt Raible
 
Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Matt Raible
 
うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-kyon mm
 
Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Matt Raible
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Matt Raible
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopArun Gupta
 
Vaadin and Spring at Devoxx UK 2015
Vaadin and Spring at Devoxx UK 2015Vaadin and Spring at Devoxx UK 2015
Vaadin and Spring at Devoxx UK 2015Sami Ekblad
 
Bootiful Development with Spring Boot and React - SpringOne 2017
Bootiful Development with Spring Boot and React - SpringOne 2017Bootiful Development with Spring Boot and React - SpringOne 2017
Bootiful Development with Spring Boot and React - SpringOne 2017Matt Raible
 
Spark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSSpark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSArun Gupta
 

What's hot (20)

Web components with java by Haijian Wang
Web components with java by Haijian WangWeb components with java by Haijian Wang
Web components with java by Haijian Wang
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java Developers
 
GWT + Gears : The browser is the platform
GWT + Gears : The browser is the platformGWT + Gears : The browser is the platform
GWT + Gears : The browser is the platform
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021
 
Vaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIVaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UI
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
Vaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web ComponentsVaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web Components
 
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
 
A Gentle Introduction to Angular Schematics - Angular SF 2019
A Gentle Introduction to Angular Schematics - Angular SF 2019A Gentle Introduction to Angular Schematics - Angular SF 2019
A Gentle Introduction to Angular Schematics - Angular SF 2019
 
Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010
 
うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-
 
Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019
 
Vaadin 8 and 10
Vaadin 8 and 10Vaadin 8 and 10
Vaadin 8 and 10
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
 
Vaadin and Spring at Devoxx UK 2015
Vaadin and Spring at Devoxx UK 2015Vaadin and Spring at Devoxx UK 2015
Vaadin and Spring at Devoxx UK 2015
 
Bootiful Development with Spring Boot and React - SpringOne 2017
Bootiful Development with Spring Boot and React - SpringOne 2017Bootiful Development with Spring Boot and React - SpringOne 2017
Bootiful Development with Spring Boot and React - SpringOne 2017
 
Spark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSSpark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RS
 

Viewers also liked

Functional UIs with Java 8 and Vaadin JavaOne2014
Functional UIs with Java 8 and Vaadin JavaOne2014Functional UIs with Java 8 and Vaadin JavaOne2014
Functional UIs with Java 8 and Vaadin JavaOne2014hezamu
 
Turducken - Divide and Conquer large GWT apps with multiple teams
Turducken - Divide and Conquer large GWT apps with multiple teamsTurducken - Divide and Conquer large GWT apps with multiple teams
Turducken - Divide and Conquer large GWT apps with multiple teamsRobert Keane
 
Gwt.Create Keynote San Francisco
Gwt.Create Keynote San FranciscoGwt.Create Keynote San Francisco
Gwt.Create Keynote San FranciscoRay Cromwell
 
Kotlin Bytecode Generation and Runtime Performance
Kotlin Bytecode Generation and Runtime PerformanceKotlin Bytecode Generation and Runtime Performance
Kotlin Bytecode Generation and Runtime Performanceintelliyole
 
Containers #101 Meetup: Docker Build & Test Flow
Containers #101 Meetup: Docker Build & Test FlowContainers #101 Meetup: Docker Build & Test Flow
Containers #101 Meetup: Docker Build & Test FlowCodefresh
 
The Art of Metaprogramming in Java
The Art of Metaprogramming in Java  The Art of Metaprogramming in Java
The Art of Metaprogramming in Java Abdelmonaim Remani
 
Gwt widget frameworks_presentation
Gwt widget frameworks_presentationGwt widget frameworks_presentation
Gwt widget frameworks_presentationDavid Amend
 
Swift and Kotlin Presentation
Swift and Kotlin PresentationSwift and Kotlin Presentation
Swift and Kotlin PresentationAndrzej Sitek
 
Kotlin: Why Do You Care?
Kotlin: Why Do You Care?Kotlin: Why Do You Care?
Kotlin: Why Do You Care?intelliyole
 
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)Chen Cheng-Wei
 
IBM DataPower Gateway - Common Use Cases
IBM DataPower Gateway - Common Use CasesIBM DataPower Gateway - Common Use Cases
IBM DataPower Gateway - Common Use CasesIBM DataPower Gateway
 

Viewers also liked (12)

Functional UIs with Java 8 and Vaadin JavaOne2014
Functional UIs with Java 8 and Vaadin JavaOne2014Functional UIs with Java 8 and Vaadin JavaOne2014
Functional UIs with Java 8 and Vaadin JavaOne2014
 
Turducken - Divide and Conquer large GWT apps with multiple teams
Turducken - Divide and Conquer large GWT apps with multiple teamsTurducken - Divide and Conquer large GWT apps with multiple teams
Turducken - Divide and Conquer large GWT apps with multiple teams
 
Gwt.Create Keynote San Francisco
Gwt.Create Keynote San FranciscoGwt.Create Keynote San Francisco
Gwt.Create Keynote San Francisco
 
Kotlin Bytecode Generation and Runtime Performance
Kotlin Bytecode Generation and Runtime PerformanceKotlin Bytecode Generation and Runtime Performance
Kotlin Bytecode Generation and Runtime Performance
 
Containers #101 Meetup: Docker Build & Test Flow
Containers #101 Meetup: Docker Build & Test FlowContainers #101 Meetup: Docker Build & Test Flow
Containers #101 Meetup: Docker Build & Test Flow
 
The Art of Metaprogramming in Java
The Art of Metaprogramming in Java  The Art of Metaprogramming in Java
The Art of Metaprogramming in Java
 
Gwt widget frameworks_presentation
Gwt widget frameworks_presentationGwt widget frameworks_presentation
Gwt widget frameworks_presentation
 
Swift and Kotlin Presentation
Swift and Kotlin PresentationSwift and Kotlin Presentation
Swift and Kotlin Presentation
 
Kotlin: Why Do You Care?
Kotlin: Why Do You Care?Kotlin: Why Do You Care?
Kotlin: Why Do You Care?
 
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
 
JSON and REST
JSON and RESTJSON and REST
JSON and REST
 
IBM DataPower Gateway - Common Use Cases
IBM DataPower Gateway - Common Use CasesIBM DataPower Gateway - Common Use Cases
IBM DataPower Gateway - Common Use Cases
 

Similar to GWT Reloaded

Present and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspectivePresent and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspectiveManuel Carrasco Moñino
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonHamed Hatami
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day DNG Consulting
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesKeith Fitzgerald
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web ToolkitDidier Girard
 
Javascript as a target language - GWT kickoff - part1/2
Javascript as a target language - GWT kickoff - part1/2Javascript as a target language - GWT kickoff - part1/2
Javascript as a target language - GWT kickoff - part1/2JooinK
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Toolsbarciszewski
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2JooinK
 
JavaScript vs Nodejs: The Key Differences That You Must Know
JavaScript vs Nodejs: The Key Differences That You Must KnowJavaScript vs Nodejs: The Key Differences That You Must Know
JavaScript vs Nodejs: The Key Differences That You Must Knowcalltutors
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Codecamp Romania
 
DEVBCN_Jakarta EE! The future of enterprise application behind the myths. _Al...
DEVBCN_Jakarta EE! The future of enterprise application behind the myths.
_Al...DEVBCN_Jakarta EE! The future of enterprise application behind the myths.
_Al...
DEVBCN_Jakarta EE! The future of enterprise application behind the myths. _Al...Alberto Salazar
 
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in ActionBill Scott
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTManuel Carrasco Moñino
 
5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should AboutBJIT Ltd
 
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocks
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocksTop Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocks
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocksZeroTurnaround
 
GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)firenze-gtug
 

Similar to GWT Reloaded (20)

Present and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspectivePresent and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspective
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web Toolkit
 
Javascript as a target language - GWT kickoff - part1/2
Javascript as a target language - GWT kickoff - part1/2Javascript as a target language - GWT kickoff - part1/2
Javascript as a target language - GWT kickoff - part1/2
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Tools
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
 
JavaScript vs Nodejs: The Key Differences That You Must Know
JavaScript vs Nodejs: The Key Differences That You Must KnowJavaScript vs Nodejs: The Key Differences That You Must Know
JavaScript vs Nodejs: The Key Differences That You Must Know
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
DEVBCN_Jakarta EE! The future of enterprise application behind the myths. _Al...
DEVBCN_Jakarta EE! The future of enterprise application behind the myths.
_Al...DEVBCN_Jakarta EE! The future of enterprise application behind the myths.
_Al...
DEVBCN_Jakarta EE! The future of enterprise application behind the myths. _Al...
 
GWT-Basics
GWT-BasicsGWT-Basics
GWT-Basics
 
GWT-Basics
GWT-BasicsGWT-Basics
GWT-Basics
 
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
 
Java Google Web Toolkit-GWT
Java Google Web Toolkit-GWTJava Google Web Toolkit-GWT
Java Google Web Toolkit-GWT
 
5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About
 
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocks
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocksTop Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocks
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocks
 
GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)
 

Recently uploaded

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 

Recently uploaded (20)

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 

GWT Reloaded

  • 1. GWT Reloaded Building complex browser-based applications in Java 8 © 2016 by Marcin Szałomski
  • 2. Topics ❏ What is GWT and who stands behind it? ❏ GWT retrospection (2006-2016) ❏ The Future of GWT ❏ What about the popular JS frameworks? ❏ Why do we still need GWT? ❏ Who and how is using GWT? ❏ How to use GWT? ❏ Errai Framework - Java EE In The Browser. ❏ Useful links
  • 3. Google Web Toolkit? Still Google? It was originally created and developed by Google. Now? Google - member of the GWT Open Source Project. So who’s the boss? (late 2011-...) GWT Steering committee : Google, Vaadin, Sencha, RedHat, Arcbees, Bizo, Jetbrains, Thomas Broyer and Colin Alworth. (to ensure that no particular individual, group or organization can gain control over the project) What’s changed? The project gets better!
  • 4. Java to JavaScript compiler. ❏ open-source, completely free, ❏ the active community, ❏ still developed and maintained ❏ lots of tools and libs around ❏ GWT.create, GWTcon , conferences, ❏ used by thousands of developers around the world, ❏ ... GWT? Development toolkit for building and optimizing complex browser- based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript.
  • 5. GWT in the Past ❏ ...was born in Google (2006) ❏ graduated to open source in late 2011 (steering committee) ❏ in 2006 browsers and JavaScript were far from standards (jQuery just announced for the first time!) ❏ almost lack of HQ alternative, ❏ The goal: browsers tricks hidden for developers Ok, but the web has changed over the past decade. We have now a lot of awesome front-end frameworks like: Angular, Polymer or React. Do we still need GWT?
  • 6.
  • 7. Why do we still need GWT? [1 of 2] JavaScript became lingua franca of front-end applications. But developers need better tools. OK, we have: ES6+, CoffeeScript, TypeScript, JSweet, Dart, … Developers need stronger typing! Weakly typed language may produce unpredictable results! Future of JavaScript? ❏ There was JavaScript in 1996, ❏ There was JavaScript in 2006 ❏ There is JavaScript in 2016 ❏ … who knows… ❏ ...the future? WebAssembly? GWT alternative? Kotlin.js , Scala.js , Ceylon and more … even other tools for Java. such as the importance of the JavaScript has grown each year
  • 8. Why do we need stronger typing? Is JavaScript so bad? What about the EcmaScript 6 or TypeScript? ES6 doesn’t support for types. TypeScript offers support for types, but doesn’t support strong type system. Strong typing guarantees your code is free of silly mistakes. No more mixing up strings or numbers, forgetting what keys an object has, or worrying about typos in your method names. It also provides easy and reliable refactoring and reliable code completion. * - This nice explanation has been taken from the Scala.JS site.
  • 9. Why do we still need GWT? [2 of 2] Principles: DRY and DIE! Reuse, reuse, reuse, ...! Cross-platform approach. One Java code base, various platforms. … mobile web, native targets like mobile devices … and perhaps even the IOT... To reuse even Java Backend code … ...JAVA, JAVA, ... ...for native consider also: Titanium4J (GWT), Intel Multi-OS Engine or Codename One... Reuse: business logic, model, validation, etc. Titanium4J or Codename One helps you even with the UI.
  • 10. More tech: ❏ JSInterop: @JSType and @JSProperty instead of JSNI or JSO, ❏ Super Dev Mode (edit-refresh), ❏ GSS Support , ❏ J2CL (Java-to-CLosure aka Jackal) - Closure Compiler , ❏ Elemental 2.0, … GWT in the Future // GWT 3.0 Simple summary: ❏ 2.8.0 beta already available, ❏ 3.0 in development, What has changed: ❏ reinvented interoperability with JavaScript, ❏ new improved compiler, ❏ Java 8 support! For more please see this: presentation and the article .
  • 11. Additional references: GWT and Java 8 GWT 2.8 allows us to enjoy Java 8. Further benefits are eg. FRP (Reactive). Actually it's nothing new, but lot of projects stucked in the previous GWT version. The reason to switch? Please see this presentation (starting from slide #20). One of the key features - lambda expressions: Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() { @Override public void execute() { $(image).css("display", "block"); } }); Scheduler.get().scheduleDeferred(() -> $(image).css("display", "block")); JAVA 7 JAVA 8
  • 12. Who is using GWT? GWT is used by many products at Google, including: AdWords, AdSense, Flights, Hotel Finder, Offers, Wallet, Blogger, Google Sheets, Parts of Maps and Google Inbox (May 28, 2015 - officially opened).
  • 13. One App, Many Platforms Java code reused ➤ Inbox Web uses GWT JsInterop ➤ Inbox iOS uses J2ObjC
  • 14. Recently Google announced that has rewritten the AdWords UI using Dart . So what does it mean for GWT? I’ve compared both after reading the interview with primary technical lead: Explained with the details here . [x] Dart [x] GWT transpiles well to Javascript [_] Dart [x] GWT switch tech stacks easily [_] Dart [x] GWT stronger type checking [_] Dart [x] GWT fast edit refresh [x] Dart [x] GWT new js interop [x] Dart [x] GWT being terse [x] Dart [x] GWT frameworks available [_] Dart [x] GWT native apps What about the AdWords?
  • 15. Who else is using GWT? Please find “The Future of GWT Report 2015” here . Mostly for large-scale web applications like: ❏ Internal and External business applications, ❏ Content-rich websites… Why? ❏ maintainability of the code is important
  • 16. How to use GWT? Presentation - building Polymer Elements powered app with Vaadin Framework: . Presentation introducing Errai Framework . Btw. it’s worth mentioning that GWT can be also used to create non browser based apps using Node.js, since it’s Java to JS compiler. Errai Framework? ❏ building full-stack web apps, ❏ type-safe and declarative, ❏ “It's better to have less code that clearly expresses intent” ❏ convention over configuration, ❏ Share code between the client and the server, ❏ DRY: Reuse your data model, validation and business logic,... boilerplate is bad
  • 17. Errai Framework ❏ Client-side dependency injection (consistent with CDI) ❏ Client-side templating ❏ 2-way data-binding ❏ Dynamic runtime module support (using JsInterop) ❏ qualifier annotations to determine what dependencies a bean satisfies, ❏ Constructor field and setter injections, ❏ More CDI and EJB features: @Alternative, @Specializes, @Produces, scopes, CDI Events, JPA, ... ❏ injecting native JavaScript objects into IoC beans with JS interop, ❏ Support for native DOM-based UI, ❏ Support for GWT 2.8 + Java 8. … loose coupling, easy reuse, …
  • 18. Errai - how to cook with it (Errai UI example) ❏ bind Java class elements to elements in an HTML template, ❏ template files can be HTML fragments or full pages, ❏ the HTML file is the template, ❏ the Java class is a templated bean. ❏ data fields can be @Bound to the model and automatically updated. MyForm.html
  • 19. Errai - Data Binding The name and dob fields are @Bound They are kept in sync by binder. This class is @Bindable with two properties Going the other direction
  • 20. More Errai examples? Presentation introducing Errai Framework . Getting started Reference Please watch this 6 minutes movie showing Errai in action (TODO List app creating). (referers to the quite old Errai version but it’s still worth watching)
  • 21. GWTP (video), Tessell (video), MVP4G, and more … How about the UI? GWT Polymer (tutor, showcase), Vaadin (demo), Sencha GXT (doc), native apps in Titanium4J (videos) GWTMaterialDesign (demo #1, demo #2, demo #3, demo #4), Smart GWT (showcase), GwtBootstrap3 (demo), jqm4gwt (jQuery Mobile showcase), ... What if not Errai? GWT 3 way of using UI. Widgets will be depreciated. Using the new JSInterop and Elemental it should be now possible to simply use any 3rd party JavaScript UI library or integrate with frameworks like React/Redux or Angular .
  • 22. GWT related links ❏ Conference slides ❏ Sources ❏ Some videos: GWT Meet-up 2015 GWT.create 2015 ❏ GWT Project site Interesting articles: ❏ Build Powerful JavaScript Front Ends Using Java ❏ What happened in 2015/2016 for GWT ? ❏ Java mobile tech overview