SlideShare uma empresa Scribd logo
1 de 44
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!


Mais conteúdo relacionado

Mais procurados

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 JVMsMaarten 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 jvmJamie Coleman
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVMRyan Cuprak
 
Java EE Microservices
Java EE MicroservicesJava EE Microservices
Java EE Microservicesjclingan
 
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 applicationJulien Dubois
 
MicroProfile Devoxx.us
MicroProfile Devoxx.usMicroProfile Devoxx.us
MicroProfile Devoxx.usjclingan
 
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 HTML5Stephen Chin
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsDavid Delabassee
 
Grails Plugin Best Practices
Grails Plugin Best PracticesGrails Plugin Best Practices
Grails Plugin Best PracticesBurt 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 ProjectsGR8Conf
 
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 2011Nuxeo
 
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 worldRed Hat Developers
 
Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Eric Barroca
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSLana Kalashnyk
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTaro 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 DockerMaarten Smeets
 
Net Beans61 Ide
Net Beans61 IdeNet Beans61 Ide
Net Beans61 Idesatyajit_t
 

Mais procurados (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
 
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
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
Java EE Microservices
Java EE MicroservicesJava EE Microservices
Java EE Microservices
 
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
 
Micronaut Launchpad
Micronaut LaunchpadMicronaut Launchpad
Micronaut Launchpad
 
MicroProfile Devoxx.us
MicroProfile Devoxx.usMicroProfile Devoxx.us
MicroProfile Devoxx.us
 
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
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
 
Grails Plugin Best Practices
Grails Plugin Best PracticesGrails Plugin Best Practices
Grails Plugin Best Practices
 
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
 
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
 
Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!
 
Your journey into the serverless world
Your journey into the serverless worldYour journey into the serverless world
Your journey into the serverless world
 
Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
 
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
 
Net Beans61 Ide
Net Beans61 IdeNet Beans61 Ide
Net Beans61 Ide
 

Destaque (7)

Web application security
Web application securityWeb application security
Web application security
 
Authentication using Cognos java/ASP SDK
Authentication using Cognos java/ASP SDKAuthentication using Cognos java/ASP SDK
Authentication using Cognos java/ASP SDK
 
Basic html
Basic htmlBasic html
Basic html
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 

Semelhante a GWT – The Java Advantage

Migrating to Java 11
Migrating to Java 11Migrating to Java 11
Migrating to Java 11Arto Santala
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk GwtChris 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 #1Rubens 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 6Jeffrey 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 IntroductionJohn 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 SzegedFabian 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 ApplicationsC4Media
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web ToolkitDidier 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 YoonJesang 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-13Fred 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 OpenJDKWolfgang 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 platformDidier Girard
 
OTN Developer Days - GlassFish
OTN Developer Days - GlassFishOTN Developer Days - GlassFish
OTN Developer Days - GlassFishglassfish
 
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 HTML5Stephen Chin
 

Semelhante a GWT – The Java Advantage (20)

Migrating to Java 11
Migrating to Java 11Migrating to Java 11
Migrating to Java 11
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk Gwt
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
 
JS digest. October 2017
JS digest. October 2017 JS digest. October 2017
JS digest. October 2017
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1
 
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
 
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
 
Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
 
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
 
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
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web Toolkit
 
GlassFish Community and future larochelle
GlassFish Community and future larochelleGlassFish Community and future larochelle
GlassFish Community and future larochelle
 
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
 
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
 
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
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
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
 
OTN Developer Days - GlassFish
OTN Developer Days - GlassFishOTN Developer Days - GlassFish
OTN Developer Days - 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
 

Último

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Último (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

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