SlideShare a Scribd company logo
GWT – The Java Advantage
Yoav Aharoni
Consultant, AlphaCSP
2
Oracle
Week
10/11/10
» Introduction
» GWT in Action
» How does it work?
» Key Features
» Best Practices
» Recap
» Discussion
» 3rd Parties
» Reference
Agenda
3
Oracle
Week
10/11/10
Introduction
GWT What?
4
Oracle
Week
10/11/10
 A Web Framework.
 A SOUI / SOFEA Framework.
 A Sort of JavaScript Framework.
 One of Google’s gifts to Java developers.
 All of the Above.
Google Web Toolkit Is:
Introduction
Service-Oriented Front-End
Architecture or Service-
Oriented User Interface
5
Oracle
Week
10/11/10
» A web framework for rapid developing and debugging
of JavaScript front-end applications in Java.
1. Develop in Java.
2. Compile into JavaScript.
3. Run on a Browser.
GWT in a Nutshell...
Introduction
BrowserJavaScriptJava
6
Oracle
Week
10/11/10
“GWT's mission is to radically improve the web
experience for users by enabling developers to use
existing Java tools to build no-compromise AJAX for
any modern browser.”
Mission Statement
Introduction
7
Oracle
Week
10/11/10
» It’s built for speed and it’s fast as it gets.
» Runs natively on the browser, no plugins needed.
» Cross browser compatible.
» Has everything a framework needs.
 Dynamic, rich, reusable widgets. Lots of them.
 Utilities and more.
» Big active community.
» Many 3rd party libraries already out there.
» Simple built-in Ajax/RPC mechanism.
What’s so good about it?
Introduction
8
Oracle
Week
10/11/10
» Develop using Java.
 Using YOUR IDE.
 Detect error in compile-time rather than runtime.
 Java tools: refactoring, debugging, profiling, etc…
 JUnit integration.
» Good development environment.
» It’s Open source: Apache v2.0 license.
» It’s Google’s – will be around for a long time.
What’s so good about it?
Introduction
9
Oracle
Week
10/11/10
» Announced at JavaOne, 2006.
» Formerly known as “Project Red Pill”.
» Current release: 2.1.
History
Introduction
05/
2006
10/
2010
06/
2009
GWT 1.0 RC 1
08/
2006
11/
2006
02/
2007
08/
2007
08/
2008
04/
2009
12/
2009
V 2.0V 1.7 V 2.1V 1.5
10
Oracle
Week
10/11/10
» Announced at JavaOne, 2006.
» Formerly known as “Project Red Pill”.
» Current release: 2.1.
History
Introduction
05/
2006
10/
2010
06/
2009
GWT 1.0 RC 1
V 2.0V 1.7
08/
2006
11/
2006
02/
2007
08/
2007
08/
2008
04/
2009
12/
2009
V 2.1
• Support for Java 5 features.
• Even more compiler optimizations.
• UI library additions (animations, themes).
• I18N (Bi-di, pluralizations), accessibility.
• Better DOM API.
V 1.5
11
Oracle
Week
10/11/10
» Announced at JavaOne, 2006.
» Formerly known as “Project Red Pill”.
» Current release: 2.1.
History
Introduction
05/
2006
10/
2010
06/
2009
GWT 1.0 RC 1
V 2.0V 1.7
08/
2006
11/
2006
02/
2007
08/
2007
08/
2008
04/
2009
12/
2009
V 2.1
• Development Mode
• Speed Tracer
• Code Splitting
• Compiler Optimizations
• Draft Compile
• Declarative UI
• ClientBundle
• HtmlUnit
V 1.5
12
Oracle
Week
10/11/10
» Announced at JavaOne, 2006.
» Formerly known as “Project Red Pill”.
» Current release: 2.1.
History
Introduction
05/
2006
10/
2010
06/
2009
GWT 1.0 RC 1
V 2.0V 1.7
08/
2006
11/
2006
02/
2007
08/
2007
08/
2008
04/
2009
12/
2009
V 2.1
• Cell Widgets
• MVP Framework
• Request Factory
• Editor framework
• Logging
• SafeHtml
• Spring Integration
V 1.5
13
Oracle
Week
10/11/10
GWT in Action
Seeing is believing
14
Oracle
Week
10/11/10
How does it work?
... and why is it so damn fast...
15
Oracle
Week
10/11/10
Architecture
JRE Emulation
GWT Compiler
Dev.
Mode
Class Library
Development
Servlet Container
GWT RPC
Remote Service Servlet
Web
Services
Server-Side
Ajax
GWT Runtime
Compiled
JavaScript
Client-Side
Compile
16
Oracle
Week
10/11/10
Development Lifecycle
Download SDK
+ Browser Plugin
Create Project
with IDE/Maven
Develop & Code
View & Debug
using Dev. Mode
Compile to
JavaScript
Deploy to Prod
Server
Profile with
Speed Tracer
Unit Test with
Java Tools
Debug using
Dev. Mode
Fix Bugs
17
Oracle
Week
10/11/10
» Definition: a technique used by the GWT compiler to
create and select a specific implementation of a class
based on a set of parameters.
» GWT produces a different application permutations for
each browser environment.
 Only one of these permutations is downloaded and executed
by the browser.
 Permutations can be created for each Locale.
 Additional custom parameters can be configured.
Deferred Binding
DOMImpl impl = GWT.create(DOMImpl.class);
18
Oracle
Week
10/11/10
» Branching is done in compile time rather than runtime.
 No runtime penalty for lookup.
» Download and evaluate only the minimum needed
code.
 Reduce download size.
 Reduce execution time.
» Saves development time by automatically generating
code to implement an interface or create a proxy class.
Deferred Binding - Benefits
More Info
20
Oracle
Week
10/11/10
» Only “used” code is compiled.
» Highly optimized JavaScript and CSS code.
» Images can be combined into one file to minimize
server requests (aka Image Sprites).
Compilation
21
Oracle
Week
10/11/10
» JavaScript implementations of the most commonly
used classes in JRE
 most of the java.lang package
 a subset of the java.util package
» Several classes are missing
 java.util.Calendar
 date-formatting classes
JRE emulation library
More Info
23
Oracle
Week
10/11/10
Developing with GWT
Lets get to work!
More Info
24
Oracle
Week
10/11/10
» Google SDK
» Eclipse
 Google Plugin for Eclipse
 Google GWT Designer (previously Instantiations)
 Cypal Studio for GWT
» IntelliJ IDEA - GWT Support Plugin.
» Netbeans - GWT4NB Plugin
» Maven - gwt-maven-plugin
» Speed Tracer
» GWT Theme Generator
Available Tools
More Info
34
Oracle
Week
10/11/10
Key Features
Tools of the Toolkit
35
Oracle
Week
10/11/10
» Widgets, Panels and Layout
» Ajax
» Internationalization
» ClientBundle
» UiBinder
» JavaScript Native Interface
» Bookmarks & Browser History Management
» Logging
» Safe HTML
» Validations
Key Features
50
Oracle
Week
10/11/10
Best Practices
Learn from experience
51
Oracle
Week
10/11/10
» All around the world developer have embraced:
Google Web Toolkit Best Practice.
» Highlights:
 Embrace Asynchrony.
 Command (dispatcher) pattern.
 Decoupling, decoupling, decoupling.
 MVP (Model/View/Presenter) pattern.
 Dependency Injection.
 Event Bus.
 Support history from the start (using PlaceManager).
GWT Best Practices
52
Oracle
Week
10/11/10
» Many 3rd party libraries implementing these concepts
has spawned.
» In GWT 2.1 built-in support for MVP, activities and
places was added.
 Joining the existing event bus support.
GWT Best Practices
53
Oracle
Week
10/11/10
HTML5 Show Case
54
Oracle
Week
10/11/10
Recap
Let’s wrap it up
55
Oracle
Week
10/11/10
» Driven by a big corporation - Google.
» Lighting fast.
 UI code runs at the client.
 Deferred binding.
 Code optimizations and magnification.
 Code splitting.
 Image Sprites.
 Asynchronous DNA.
 No state needs to be saved on the server.
Pros
Recap
Scalable
Responsive
Application
=
56
Oracle
Week
10/11/10
» Big, active community.
» Mature project (Version 2.1), ever improving.
» Has all you’re ever need + many 3rd party libs.
» Open Source (Apache v2.0) License.
» No Plugins needed.
» HTML 5 support.
» Can work with any back-end technology (like .NET) or
even without any back-end application.
Pros
Recap
57
Oracle
Week
10/11/10
» Satisfying development cycles using development
mode.
» Java development, with all benefits included.
 Java tools, refactoring, debugging.
 Strictly typed.
 Detect errors in compile time.
 Java unit testing.
» Toolkit tools: IDE plugins, Designer.
Pros
Recap
58
Oracle
Week
10/11/10
» Relies entirely on JavaScript.
 Cannot work if JavaScript is disabled.
 Accessibility issues (especially with older readers etc).
 Limited reflection.
 Limited SEO (search engine optimization).
» HTML Markup is harder to tweak.
» Longer design-refresh development cycles compared to
pure HMTL/CSS/JavaScript development.
» Almost impossible to debug production client-side code.
Cons
Recap
59
Oracle
Week
10/11/10
» When using RPC, model passed to the client must be
“hand-picked”.
 i.e when working with JPA/Hibernate.
 Might need to create TOs.
» Relatively slow bootstrap on page load compared to
plain HTML/CSS pages.
 Which is eventually faster, if application only loads once.
 But might be annoying if application is reloaded on every page
change.
Cons
Recap
60
Oracle
Week
10/11/10
» Best for:
 Building RIA.
 Desktop like applications.
 HTML5 Games.
 Gadgets.
» Not to be used for:
 Building simple/content websites.
 Applications which relies heavily on form submit.
Conclusion
Recap
61
Oracle
Week
10/11/10
Discussion
...This is the part where you ask questions...
62
Oracle
Week
10/11/10
3rd Parties
Community Contributions
63
Oracle
Week
10/11/10
» Google Web Toolkit Incubator
» Ajax/REST:
 GWT-REST
 RestyGWT
 Restlet
 Gwittir (+ other utilities)
» Widgets and more:
 Ext GWT (aka GXT), based on Ext-JS
 SmartGWT, based on Smart-Client
 Tatami, based on Dojo
 GWT Mosaic
3rd Party Libraries & Frameworks
64
Oracle
Week
10/11/10
» Patterns (MVP, MVC,...):
 GWT-Presenter
 GWT-Dispatch
 GWT-MVP
 GWTP
 GWT-Pectin
 MVP4G
» Charts:
 Gchart – HTML5/Canvas Charts (no Plugins).
 OFCGWT – Open Flash Chart integration.
 Charts4j-GWT – Google API Charts.
3rd Party Libraries & Frameworks
65
Oracle
Week
10/11/10
» Dependency Injection:
 GIN – Guice-like DI
 GWToolbox – Spring-like DI + utilities + widgets.
 Rocket-GWT – DI + utilities.
» Utilities:
 GWT-Log – Logging.
 GWT-Validation – Validation.
 GWT-DND – Drag n’ drop.
 GWT-FX – Animations.
 Goda-Time – Joda Time for GWT.
 GWT-Mobile-Webkit – HTML 5 support.
3rd Party Libraries & Frameworks
66
Oracle
Week
10/11/10
» Canvas:
 GWT-Canvas
 GWT-G2D
 GWTCanvas – inside Google Incubator.
» Misc:
 Emite – XMPP (Jabber) Chat Client.
 GWT-Cal – Calendar widget (like Google Calendar, Outlook, iCal).
 Vaadin – Framework based on GWT.
 GWT-Client-Storage – HTML5 local storage.
3rd Party Libraries & Frameworks
67
Oracle
Week
10/11/10
» Spring Integration
 Spring MVC
 Spring Roo (since GWT 2.1)
 Spring Insight profiler.
» Vaadin – Framework based on GWT.
Integration
68
Oracle
Week
10/11/10
» GWT Reference
» Javadoc
» Forum
» onGWT.com
» Blog
» Books
Documentation
Reference
68
69
Oracle
Week
10/11/10
Thank You!

Ad

More Related Content

What's hot (20)

Performance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMsPerformance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMs
Maarten Smeets
 
Simple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmSimple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvm
Jamie Coleman
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
Ryan Cuprak
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
Manuel Carrasco Moñino
 
Java EE Microservices
Java EE MicroservicesJava EE Microservices
Java EE Microservices
jclingan
 
Performance tuning the Spring Pet Clinic sample application
Performance tuning the Spring Pet Clinic sample applicationPerformance tuning the Spring Pet Clinic sample application
Performance tuning the Spring Pet Clinic sample application
Julien Dubois
 
Micronaut Launchpad
Micronaut LaunchpadMicronaut Launchpad
Micronaut Launchpad
Zachary Klein
 
MicroProfile Devoxx.us
MicroProfile Devoxx.usMicroProfile Devoxx.us
MicroProfile Devoxx.us
jclingan
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
Stephen Chin
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
David Delabassee
 
Grails Plugin Best Practices
Grails Plugin Best PracticesGrails Plugin Best Practices
Grails Plugin Best Practices
Burt Beckwith
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
GR8Conf
 
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
Nuxeo
 
Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!
Zachary Klein
 
Your journey into the serverless world
Your journey into the serverless worldYour journey into the serverless world
Your journey into the serverless world
Red Hat Developers
 
Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06
Eric Barroca
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
Taro L. Saito
 
Google jib: Building Java containers without Docker
Google jib: Building Java containers without DockerGoogle jib: Building Java containers without Docker
Google jib: Building Java containers without Docker
Maarten Smeets
 
Net Beans61 Ide
Net Beans61 IdeNet Beans61 Ide
Net Beans61 Ide
satyajit_t
 
Performance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMsPerformance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMs
Maarten Smeets
 
Simple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmSimple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvm
Jamie Coleman
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
Ryan Cuprak
 
Java EE Microservices
Java EE MicroservicesJava EE Microservices
Java EE Microservices
jclingan
 
Performance tuning the Spring Pet Clinic sample application
Performance tuning the Spring Pet Clinic sample applicationPerformance tuning the Spring Pet Clinic sample application
Performance tuning the Spring Pet Clinic sample application
Julien Dubois
 
MicroProfile Devoxx.us
MicroProfile Devoxx.usMicroProfile Devoxx.us
MicroProfile Devoxx.us
jclingan
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
Stephen Chin
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
David Delabassee
 
Grails Plugin Best Practices
Grails Plugin Best PracticesGrails Plugin Best Practices
Grails Plugin Best Practices
Burt Beckwith
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
GR8Conf
 
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
Nuxeo
 
Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!
Zachary Klein
 
Your journey into the serverless world
Your journey into the serverless worldYour journey into the serverless world
Your journey into the serverless world
Red Hat Developers
 
Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06
Eric Barroca
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
Taro L. Saito
 
Google jib: Building Java containers without Docker
Google jib: Building Java containers without DockerGoogle jib: Building Java containers without Docker
Google jib: Building Java containers without Docker
Maarten Smeets
 
Net Beans61 Ide
Net Beans61 IdeNet Beans61 Ide
Net Beans61 Ide
satyajit_t
 

Viewers also liked (7)

Web application security
Web application securityWeb application security
Web application security
Sandeep Sharma IIMK Smart City,IoT,Bigdata,Cloud,BI,DW
 
Authentication using Cognos java/ASP SDK
Authentication using Cognos java/ASP SDKAuthentication using Cognos java/ASP SDK
Authentication using Cognos java/ASP SDK
Sandeep Sharma IIMK Smart City,IoT,Bigdata,Cloud,BI,DW
 
Basic html
Basic htmlBasic html
Basic html
Drew Eric Noftle
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
sanjoysanyal
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
jeroenvdmeer
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
MayaLisa
 
Html Ppt
Html PptHtml Ppt
Html Ppt
vijayanit
 
Ad

Similar to GWT – The Java Advantage (20)

Migrating to Java 11
Migrating to Java 11Migrating to Java 11
Migrating to Java 11
Arto Santala
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk Gwt
Chris Schalk
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
DNG Consulting
 
JS digest. October 2017
JS digest. October 2017 JS digest. October 2017
JS digest. October 2017
ElifTech
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
Alexis Moussine-Pouchkine
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1
Rubens Dos Santos Filho
 
WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6
Jeffrey West
 
Red Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus IntroductionRed Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus Introduction
John Archer
 
Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
Martin Toshev
 
Lecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Lecture 8 - Qooxdoo - Rap Course At The University Of SzegedLecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Lecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Fabian Jakobs
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
C4Media
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web Toolkit
Didier Girard
 
GlassFish Community and future larochelle
GlassFish Community and future larochelleGlassFish Community and future larochelle
GlassFish Community and future larochelle
Alexis Moussine-Pouchkine
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
Jesang Yoon
 
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
Fred Sauer
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
Wolfgang Weigend
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
Michael Angelo Rivera
 
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
Didier Girard
 
OTN Developer Days - GlassFish
OTN Developer Days - GlassFishOTN Developer Days - GlassFish
OTN Developer Days - GlassFish
glassfish
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
Stephen Chin
 
Migrating to Java 11
Migrating to Java 11Migrating to Java 11
Migrating to Java 11
Arto Santala
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk Gwt
Chris Schalk
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
DNG Consulting
 
JS digest. October 2017
JS digest. October 2017 JS digest. October 2017
JS digest. October 2017
ElifTech
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1
Rubens Dos Santos Filho
 
WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6
Jeffrey West
 
Red Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus IntroductionRed Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus Introduction
John Archer
 
Lecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Lecture 8 - Qooxdoo - Rap Course At The University Of SzegedLecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Lecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Fabian Jakobs
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
C4Media
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web Toolkit
Didier Girard
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
Jesang Yoon
 
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
Fred Sauer
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
Wolfgang Weigend
 
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
Didier Girard
 
OTN Developer Days - GlassFish
OTN Developer Days - GlassFishOTN Developer Days - GlassFish
OTN Developer Days - GlassFish
glassfish
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
Stephen Chin
 
Ad

Recently uploaded (20)

Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Agentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community MeetupAgentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community Meetup
Manoj Batra (1600 + Connections)
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Top-AI-Based-Tools-for-Game-Developers (1).pptx
Top-AI-Based-Tools-for-Game-Developers (1).pptxTop-AI-Based-Tools-for-Game-Developers (1).pptx
Top-AI-Based-Tools-for-Game-Developers (1).pptx
BR Softech
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Top-AI-Based-Tools-for-Game-Developers (1).pptx
Top-AI-Based-Tools-for-Game-Developers (1).pptxTop-AI-Based-Tools-for-Game-Developers (1).pptx
Top-AI-Based-Tools-for-Game-Developers (1).pptx
BR Softech
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 

GWT – The Java Advantage

  • 1. GWT – The Java Advantage Yoav Aharoni Consultant, AlphaCSP
  • 2. 2 Oracle Week 10/11/10 » Introduction » GWT in Action » How does it work? » Key Features » Best Practices » Recap » Discussion » 3rd Parties » Reference Agenda
  • 4. 4 Oracle Week 10/11/10  A Web Framework.  A SOUI / SOFEA Framework.  A Sort of JavaScript Framework.  One of Google’s gifts to Java developers.  All of the Above. Google Web Toolkit Is: Introduction Service-Oriented Front-End Architecture or Service- Oriented User Interface
  • 5. 5 Oracle Week 10/11/10 » A web framework for rapid developing and debugging of JavaScript front-end applications in Java. 1. Develop in Java. 2. Compile into JavaScript. 3. Run on a Browser. GWT in a Nutshell... Introduction BrowserJavaScriptJava
  • 6. 6 Oracle Week 10/11/10 “GWT's mission is to radically improve the web experience for users by enabling developers to use existing Java tools to build no-compromise AJAX for any modern browser.” Mission Statement Introduction
  • 7. 7 Oracle Week 10/11/10 » It’s built for speed and it’s fast as it gets. » Runs natively on the browser, no plugins needed. » Cross browser compatible. » Has everything a framework needs.  Dynamic, rich, reusable widgets. Lots of them.  Utilities and more. » Big active community. » Many 3rd party libraries already out there. » Simple built-in Ajax/RPC mechanism. What’s so good about it? Introduction
  • 8. 8 Oracle Week 10/11/10 » Develop using Java.  Using YOUR IDE.  Detect error in compile-time rather than runtime.  Java tools: refactoring, debugging, profiling, etc…  JUnit integration. » Good development environment. » It’s Open source: Apache v2.0 license. » It’s Google’s – will be around for a long time. What’s so good about it? Introduction
  • 9. 9 Oracle Week 10/11/10 » Announced at JavaOne, 2006. » Formerly known as “Project Red Pill”. » Current release: 2.1. History Introduction 05/ 2006 10/ 2010 06/ 2009 GWT 1.0 RC 1 08/ 2006 11/ 2006 02/ 2007 08/ 2007 08/ 2008 04/ 2009 12/ 2009 V 2.0V 1.7 V 2.1V 1.5
  • 10. 10 Oracle Week 10/11/10 » Announced at JavaOne, 2006. » Formerly known as “Project Red Pill”. » Current release: 2.1. History Introduction 05/ 2006 10/ 2010 06/ 2009 GWT 1.0 RC 1 V 2.0V 1.7 08/ 2006 11/ 2006 02/ 2007 08/ 2007 08/ 2008 04/ 2009 12/ 2009 V 2.1 • Support for Java 5 features. • Even more compiler optimizations. • UI library additions (animations, themes). • I18N (Bi-di, pluralizations), accessibility. • Better DOM API. V 1.5
  • 11. 11 Oracle Week 10/11/10 » Announced at JavaOne, 2006. » Formerly known as “Project Red Pill”. » Current release: 2.1. History Introduction 05/ 2006 10/ 2010 06/ 2009 GWT 1.0 RC 1 V 2.0V 1.7 08/ 2006 11/ 2006 02/ 2007 08/ 2007 08/ 2008 04/ 2009 12/ 2009 V 2.1 • Development Mode • Speed Tracer • Code Splitting • Compiler Optimizations • Draft Compile • Declarative UI • ClientBundle • HtmlUnit V 1.5
  • 12. 12 Oracle Week 10/11/10 » Announced at JavaOne, 2006. » Formerly known as “Project Red Pill”. » Current release: 2.1. History Introduction 05/ 2006 10/ 2010 06/ 2009 GWT 1.0 RC 1 V 2.0V 1.7 08/ 2006 11/ 2006 02/ 2007 08/ 2007 08/ 2008 04/ 2009 12/ 2009 V 2.1 • Cell Widgets • MVP Framework • Request Factory • Editor framework • Logging • SafeHtml • Spring Integration V 1.5
  • 14. 14 Oracle Week 10/11/10 How does it work? ... and why is it so damn fast...
  • 15. 15 Oracle Week 10/11/10 Architecture JRE Emulation GWT Compiler Dev. Mode Class Library Development Servlet Container GWT RPC Remote Service Servlet Web Services Server-Side Ajax GWT Runtime Compiled JavaScript Client-Side Compile
  • 16. 16 Oracle Week 10/11/10 Development Lifecycle Download SDK + Browser Plugin Create Project with IDE/Maven Develop & Code View & Debug using Dev. Mode Compile to JavaScript Deploy to Prod Server Profile with Speed Tracer Unit Test with Java Tools Debug using Dev. Mode Fix Bugs
  • 17. 17 Oracle Week 10/11/10 » Definition: a technique used by the GWT compiler to create and select a specific implementation of a class based on a set of parameters. » GWT produces a different application permutations for each browser environment.  Only one of these permutations is downloaded and executed by the browser.  Permutations can be created for each Locale.  Additional custom parameters can be configured. Deferred Binding DOMImpl impl = GWT.create(DOMImpl.class);
  • 18. 18 Oracle Week 10/11/10 » Branching is done in compile time rather than runtime.  No runtime penalty for lookup. » Download and evaluate only the minimum needed code.  Reduce download size.  Reduce execution time. » Saves development time by automatically generating code to implement an interface or create a proxy class. Deferred Binding - Benefits More Info
  • 19. 20 Oracle Week 10/11/10 » Only “used” code is compiled. » Highly optimized JavaScript and CSS code. » Images can be combined into one file to minimize server requests (aka Image Sprites). Compilation
  • 20. 21 Oracle Week 10/11/10 » JavaScript implementations of the most commonly used classes in JRE  most of the java.lang package  a subset of the java.util package » Several classes are missing  java.util.Calendar  date-formatting classes JRE emulation library More Info
  • 22. 24 Oracle Week 10/11/10 » Google SDK » Eclipse  Google Plugin for Eclipse  Google GWT Designer (previously Instantiations)  Cypal Studio for GWT » IntelliJ IDEA - GWT Support Plugin. » Netbeans - GWT4NB Plugin » Maven - gwt-maven-plugin » Speed Tracer » GWT Theme Generator Available Tools More Info
  • 24. 35 Oracle Week 10/11/10 » Widgets, Panels and Layout » Ajax » Internationalization » ClientBundle » UiBinder » JavaScript Native Interface » Bookmarks & Browser History Management » Logging » Safe HTML » Validations Key Features
  • 26. 51 Oracle Week 10/11/10 » All around the world developer have embraced: Google Web Toolkit Best Practice. » Highlights:  Embrace Asynchrony.  Command (dispatcher) pattern.  Decoupling, decoupling, decoupling.  MVP (Model/View/Presenter) pattern.  Dependency Injection.  Event Bus.  Support history from the start (using PlaceManager). GWT Best Practices
  • 27. 52 Oracle Week 10/11/10 » Many 3rd party libraries implementing these concepts has spawned. » In GWT 2.1 built-in support for MVP, activities and places was added.  Joining the existing event bus support. GWT Best Practices
  • 30. 55 Oracle Week 10/11/10 » Driven by a big corporation - Google. » Lighting fast.  UI code runs at the client.  Deferred binding.  Code optimizations and magnification.  Code splitting.  Image Sprites.  Asynchronous DNA.  No state needs to be saved on the server. Pros Recap Scalable Responsive Application =
  • 31. 56 Oracle Week 10/11/10 » Big, active community. » Mature project (Version 2.1), ever improving. » Has all you’re ever need + many 3rd party libs. » Open Source (Apache v2.0) License. » No Plugins needed. » HTML 5 support. » Can work with any back-end technology (like .NET) or even without any back-end application. Pros Recap
  • 32. 57 Oracle Week 10/11/10 » Satisfying development cycles using development mode. » Java development, with all benefits included.  Java tools, refactoring, debugging.  Strictly typed.  Detect errors in compile time.  Java unit testing. » Toolkit tools: IDE plugins, Designer. Pros Recap
  • 33. 58 Oracle Week 10/11/10 » Relies entirely on JavaScript.  Cannot work if JavaScript is disabled.  Accessibility issues (especially with older readers etc).  Limited reflection.  Limited SEO (search engine optimization). » HTML Markup is harder to tweak. » Longer design-refresh development cycles compared to pure HMTL/CSS/JavaScript development. » Almost impossible to debug production client-side code. Cons Recap
  • 34. 59 Oracle Week 10/11/10 » When using RPC, model passed to the client must be “hand-picked”.  i.e when working with JPA/Hibernate.  Might need to create TOs. » Relatively slow bootstrap on page load compared to plain HTML/CSS pages.  Which is eventually faster, if application only loads once.  But might be annoying if application is reloaded on every page change. Cons Recap
  • 35. 60 Oracle Week 10/11/10 » Best for:  Building RIA.  Desktop like applications.  HTML5 Games.  Gadgets. » Not to be used for:  Building simple/content websites.  Applications which relies heavily on form submit. Conclusion Recap
  • 36. 61 Oracle Week 10/11/10 Discussion ...This is the part where you ask questions...
  • 38. 63 Oracle Week 10/11/10 » Google Web Toolkit Incubator » Ajax/REST:  GWT-REST  RestyGWT  Restlet  Gwittir (+ other utilities) » Widgets and more:  Ext GWT (aka GXT), based on Ext-JS  SmartGWT, based on Smart-Client  Tatami, based on Dojo  GWT Mosaic 3rd Party Libraries & Frameworks
  • 39. 64 Oracle Week 10/11/10 » Patterns (MVP, MVC,...):  GWT-Presenter  GWT-Dispatch  GWT-MVP  GWTP  GWT-Pectin  MVP4G » Charts:  Gchart – HTML5/Canvas Charts (no Plugins).  OFCGWT – Open Flash Chart integration.  Charts4j-GWT – Google API Charts. 3rd Party Libraries & Frameworks
  • 40. 65 Oracle Week 10/11/10 » Dependency Injection:  GIN – Guice-like DI  GWToolbox – Spring-like DI + utilities + widgets.  Rocket-GWT – DI + utilities. » Utilities:  GWT-Log – Logging.  GWT-Validation – Validation.  GWT-DND – Drag n’ drop.  GWT-FX – Animations.  Goda-Time – Joda Time for GWT.  GWT-Mobile-Webkit – HTML 5 support. 3rd Party Libraries & Frameworks
  • 41. 66 Oracle Week 10/11/10 » Canvas:  GWT-Canvas  GWT-G2D  GWTCanvas – inside Google Incubator. » Misc:  Emite – XMPP (Jabber) Chat Client.  GWT-Cal – Calendar widget (like Google Calendar, Outlook, iCal).  Vaadin – Framework based on GWT.  GWT-Client-Storage – HTML5 local storage. 3rd Party Libraries & Frameworks
  • 42. 67 Oracle Week 10/11/10 » Spring Integration  Spring MVC  Spring Roo (since GWT 2.1)  Spring Insight profiler. » Vaadin – Framework based on GWT. Integration
  • 43. 68 Oracle Week 10/11/10 » GWT Reference » Javadoc » Forum » onGWT.com » Blog » Books Documentation Reference 68
  翻译: