SlideShare uma empresa Scribd logo
1 de 48
Baixar para ler offline
Oliver Zeigermann | http://zeigermann.eu
Single Page Web Applications with Java
Donnerstag, 25. April 13
Single Page Applications
• A web application
• Only a single page is delivered by the
server to the browser
• All further action is controlled by the
JavaScript delivered along with this page
• Allows for high interactivity
• comparable to desktop applications
Donnerstag, 25. April 13
Examples of SPAs
• Facebook
• Gmail
• MicroSoft Office 365
• Twitter
• TiddlyWiki
Donnerstag, 25. April 13
Good for the user, but ...
• developing for the browser is a tough task
• might target different browsers
• DOM
•JavaScript
Donnerstag, 25. April 13
Objective of this talk
What framework do I
use to make SPAs work
with Java?
Donnerstag, 25. April 13
Decisions
• As an architect you make decisions all the
time
• You have to be aware of
• the requirements and
• the options
• If you aren‘t you can hardly make educated
decisions at all
Donnerstag, 25. April 13
Architecture: one definition
• The sum of all decisions that are either
• impossible or
• very hard to change during a project
Donnerstag, 25. April 13
The choice of the framework
could be one of the most
important architectural
decisions
Donnerstag, 25. April 13
Options
• GWT
• JBoss Errai
• GXT
• Vaadin
• AngularJS
Donnerstag, 25. April 13
Common Requirements Checklist
scales well
Java only
flexible layout
implicit remote calls
offline mode
L&F out of the box
backend reusable
client side UI logic
rich set of UI widgets
has table widget
simple tool chain
integrates well
Donnerstag, 25. April 13
GWT
Donnerstag, 25. April 13
Abstraction of differences #1
• client & server
• write everything in Java
• client part compiles to JavaScript
• shared code possible
• call to server using a proprietary RPC
protocol
Donnerstag, 25. April 13
Abstraction of differences #2
• different browsers
• dedicated JavaScript per browser
• program on widgets, not DOM
• widgets are thin layer over HTML
Donnerstag, 25. April 13
• Originally developed by Google
• Said to be as good as dead in 2012 - due to
• Google internal rival Dart
• lack of ongoing development
• Now managed by a steering committee
GWT fun facts
Donnerstag, 25. April 13
How does it look like?
Donnerstag, 25. April 13
GWT Checklist
scales well
Java only
flexible layout
implicit remote calls
offline mode
L&F out of the box
backend reusable
client side UI logic
rich set of UI widgets
has table widget
simple tool chain
integrates well
Donnerstag, 25. April 13
JBoss Errai
Donnerstag, 25. April 13
Motivation
• GWT rocks, but
• GWT-RPC sucks
• a given layout is hard to implement
Donnerstag, 25. April 13
Embraces
• GWTs JavaScript compiler and tools
• REST webservices
• lets you use JAX-RS
• DOM and HTML
• lets you define your UI using HTML
• Events
• crossing client/server boundaries
Donnerstag, 25. April 13
JBoss Errai fun facts
• Done by JBoss / Red Hat
• member of the GWT steering committee
Donnerstag, 25. April 13
Errai Checklist
scales well
Java only
flexible layout
implicit remote calls
offline mode
L&F out of the box
backend reusable
client side UI logic
rich set of UI widgets
has table widget
simple tool chain
integrates well
Donnerstag, 25. April 13
GXT
Donnerstag, 25. April 13
Motivation
• GWT rocks, but
• we need richer, most desktop like UI
widgets
• we need a good looking consistent theme
Donnerstag, 25. April 13
GXT fun facts
• Only free for non commercial use
• GWT based “reimplementation” of Ext JS
• actually NOT a wrapper over Ext JS
• embraces all of GWTs core concepts
• drives the component idea a little bit further down
the road
• Done by Sencha
• member of the GWT steering committee
Donnerstag, 25. April 13
How does it look like?
Donnerstag, 25. April 13
GXT Checklist
scales well
Java only
flexible layout
implicit remote calls
offline mode
L&F out of the box
backend reusable
client side UI logic
rich set of UI widgets
has table widget
simple tool chain
integrates well
Donnerstag, 25. April 13
Vaadin
Donnerstag, 25. April 13
Motivation
• Business applications
• have a limited budget per view
• I want to concentrate on the business logic
• Technical aspects should not
• stand in my way
• slow me down
Donnerstag, 25. April 13
Approach
• application code runs on server side only
• client-/server-communication transparent
to application developer
• using RPC and state synchronization
• uses server side session
• every non-trivial user interactions forces
client-server round-trip
Donnerstag, 25. April 13
Vaadin fun facts
• Widgets based on GWT
• All widgets initially loaded into browser
• Done by a Finnish company - also called
Vaadin - located in Turku
• member of the GWT steering committee
Donnerstag, 25. April 13
How does it look like?
Donnerstag, 25. April 13
Vaadin Checklist
scales well
Java only
flexible layout
implicit remote calls
offline mode
L&F out of the box
backend reusable
client side UI logic
rich set of UI widgets
has table widget
simple tool chain
integrates well
Donnerstag, 25. April 13
AngularJS
Donnerstag, 25. April 13
Embrace
• JavaScript
• DOM
• HTML
Donnerstag, 25. April 13
Approach
• HTML enhanced for web apps!
• How would HTML look like if it had been
invented for applications?
Donnerstag, 25. April 13
Features
• Client side MVC framework
• HTML5, DOM-based templates
• 2-Way data-binding
• Everything can be a model
• HTML5 extensions
• attributes
• tags
Donnerstag, 25. April 13
Hello World
<!doctype html>
<html ng-app>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js">
</script>
</head>
<body>
<div>
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1>
</div>
</body>
</html>
Donnerstag, 25. April 13
Java Integration:Applies
to any JavaScript
framework
Donnerstag, 25. April 13
Generic Architecture
Donnerstag, 25. April 13
Java integration pattern: Lean
• UI
• fully on client using JavaScript / AngularJS
• Business logic
• completely on server only
• Communication
• UI calls business logic using (REST) webservices
• offline mode not possible
Donnerstag, 25. April 13
Donnerstag, 25. April 13
Java integration pattern: Fat
• UI
• fully on client using JavaScript / AngularJS
• Business logic
• major parts run on client in JavaScript
• at least persistence parts run on server
• Communication
• business logic on client calls business logic on server
using (REST) webservices
• offline mode possible
Donnerstag, 25. April 13
Donnerstag, 25. April 13
GWT integration pattern
• Business logic on client could be done
using GWT
• fixes problem of maintainability
• calls to server could be REST or GWT-
RPC
• Experimental approaches even do UI part
in GWT using AngularJS binding
Donnerstag, 25. April 13
AngularJS fun facts
• Also done by Google
• like Dart and GWT
• Codenames of releases include
• radioactive-gargle
• tofu-animation
• flatulent-propulsion
Donnerstag, 25. April 13
AngularJS Checklist
scales well
Java only
flexible layout
implicit remote calls
offline mode
L&F out of the box
backend reusable
client side UI logic
rich set of UI widgets
has table widget
simple tool chain
integrates well
Donnerstag, 25. April 13
Wrap up
• SPAs are a modern
alternative to desktop
applications
• Developing SPAs with
Java is a challenging task
• Explicit Java / JavaScript
integration might be an
option for you
• All of the frameworks
presented are
reasonable choices
• which one is the right
for you depends on
your requirements
and
• the people who build
your app
Donnerstag, 25. April 13
Questions / Discussion
Oliver Zeigermann
http://zeigermann.eu
Donnerstag, 25. April 13

Mais conteúdo relacionado

Destaque

QCon 2015 - Combinando AngularJS com Java EE
QCon 2015 - Combinando AngularJS com Java EEQCon 2015 - Combinando AngularJS com Java EE
QCon 2015 - Combinando AngularJS com Java EERodrigo Cândido da Silva
 
AngularJS for Java Developers
AngularJS for Java DevelopersAngularJS for Java Developers
AngularJS for Java DevelopersLoc Nguyen
 
Making Java REST with JAX-RS 2.0
Making Java REST with JAX-RS 2.0Making Java REST with JAX-RS 2.0
Making Java REST with JAX-RS 2.0Dmytro Chyzhykov
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSShekhar Gulati
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architectureGabriele Falace
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS ArchitectureEyal Vardi
 
JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchReza Rahman
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7Shekhar Gulati
 

Destaque (8)

QCon 2015 - Combinando AngularJS com Java EE
QCon 2015 - Combinando AngularJS com Java EEQCon 2015 - Combinando AngularJS com Java EE
QCon 2015 - Combinando AngularJS com Java EE
 
AngularJS for Java Developers
AngularJS for Java DevelopersAngularJS for Java Developers
AngularJS for Java Developers
 
Making Java REST with JAX-RS 2.0
Making Java REST with JAX-RS 2.0Making Java REST with JAX-RS 2.0
Making Java REST with JAX-RS 2.0
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJS
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great Match
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7
 

Último

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Jax2013 SPA with Java

  • 1. Oliver Zeigermann | http://zeigermann.eu Single Page Web Applications with Java Donnerstag, 25. April 13
  • 2. Single Page Applications • A web application • Only a single page is delivered by the server to the browser • All further action is controlled by the JavaScript delivered along with this page • Allows for high interactivity • comparable to desktop applications Donnerstag, 25. April 13
  • 3. Examples of SPAs • Facebook • Gmail • MicroSoft Office 365 • Twitter • TiddlyWiki Donnerstag, 25. April 13
  • 4. Good for the user, but ... • developing for the browser is a tough task • might target different browsers • DOM •JavaScript Donnerstag, 25. April 13
  • 5. Objective of this talk What framework do I use to make SPAs work with Java? Donnerstag, 25. April 13
  • 6. Decisions • As an architect you make decisions all the time • You have to be aware of • the requirements and • the options • If you aren‘t you can hardly make educated decisions at all Donnerstag, 25. April 13
  • 7. Architecture: one definition • The sum of all decisions that are either • impossible or • very hard to change during a project Donnerstag, 25. April 13
  • 8. The choice of the framework could be one of the most important architectural decisions Donnerstag, 25. April 13
  • 9. Options • GWT • JBoss Errai • GXT • Vaadin • AngularJS Donnerstag, 25. April 13
  • 10. Common Requirements Checklist scales well Java only flexible layout implicit remote calls offline mode L&F out of the box backend reusable client side UI logic rich set of UI widgets has table widget simple tool chain integrates well Donnerstag, 25. April 13
  • 12. Abstraction of differences #1 • client & server • write everything in Java • client part compiles to JavaScript • shared code possible • call to server using a proprietary RPC protocol Donnerstag, 25. April 13
  • 13. Abstraction of differences #2 • different browsers • dedicated JavaScript per browser • program on widgets, not DOM • widgets are thin layer over HTML Donnerstag, 25. April 13
  • 14. • Originally developed by Google • Said to be as good as dead in 2012 - due to • Google internal rival Dart • lack of ongoing development • Now managed by a steering committee GWT fun facts Donnerstag, 25. April 13
  • 15. How does it look like? Donnerstag, 25. April 13
  • 16. GWT Checklist scales well Java only flexible layout implicit remote calls offline mode L&F out of the box backend reusable client side UI logic rich set of UI widgets has table widget simple tool chain integrates well Donnerstag, 25. April 13
  • 18. Motivation • GWT rocks, but • GWT-RPC sucks • a given layout is hard to implement Donnerstag, 25. April 13
  • 19. Embraces • GWTs JavaScript compiler and tools • REST webservices • lets you use JAX-RS • DOM and HTML • lets you define your UI using HTML • Events • crossing client/server boundaries Donnerstag, 25. April 13
  • 20. JBoss Errai fun facts • Done by JBoss / Red Hat • member of the GWT steering committee Donnerstag, 25. April 13
  • 21. Errai Checklist scales well Java only flexible layout implicit remote calls offline mode L&F out of the box backend reusable client side UI logic rich set of UI widgets has table widget simple tool chain integrates well Donnerstag, 25. April 13
  • 23. Motivation • GWT rocks, but • we need richer, most desktop like UI widgets • we need a good looking consistent theme Donnerstag, 25. April 13
  • 24. GXT fun facts • Only free for non commercial use • GWT based “reimplementation” of Ext JS • actually NOT a wrapper over Ext JS • embraces all of GWTs core concepts • drives the component idea a little bit further down the road • Done by Sencha • member of the GWT steering committee Donnerstag, 25. April 13
  • 25. How does it look like? Donnerstag, 25. April 13
  • 26. GXT Checklist scales well Java only flexible layout implicit remote calls offline mode L&F out of the box backend reusable client side UI logic rich set of UI widgets has table widget simple tool chain integrates well Donnerstag, 25. April 13
  • 28. Motivation • Business applications • have a limited budget per view • I want to concentrate on the business logic • Technical aspects should not • stand in my way • slow me down Donnerstag, 25. April 13
  • 29. Approach • application code runs on server side only • client-/server-communication transparent to application developer • using RPC and state synchronization • uses server side session • every non-trivial user interactions forces client-server round-trip Donnerstag, 25. April 13
  • 30. Vaadin fun facts • Widgets based on GWT • All widgets initially loaded into browser • Done by a Finnish company - also called Vaadin - located in Turku • member of the GWT steering committee Donnerstag, 25. April 13
  • 31. How does it look like? Donnerstag, 25. April 13
  • 32. Vaadin Checklist scales well Java only flexible layout implicit remote calls offline mode L&F out of the box backend reusable client side UI logic rich set of UI widgets has table widget simple tool chain integrates well Donnerstag, 25. April 13
  • 34. Embrace • JavaScript • DOM • HTML Donnerstag, 25. April 13
  • 35. Approach • HTML enhanced for web apps! • How would HTML look like if it had been invented for applications? Donnerstag, 25. April 13
  • 36. Features • Client side MVC framework • HTML5, DOM-based templates • 2-Way data-binding • Everything can be a model • HTML5 extensions • attributes • tags Donnerstag, 25. April 13
  • 37. Hello World <!doctype html> <html ng-app> <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"> </script> </head> <body> <div> <label>Name:</label> <input type="text" ng-model="yourName" placeholder="Enter a name here"> <hr> <h1>Hello {{yourName}}!</h1> </div> </body> </html> Donnerstag, 25. April 13
  • 38. Java Integration:Applies to any JavaScript framework Donnerstag, 25. April 13
  • 40. Java integration pattern: Lean • UI • fully on client using JavaScript / AngularJS • Business logic • completely on server only • Communication • UI calls business logic using (REST) webservices • offline mode not possible Donnerstag, 25. April 13
  • 42. Java integration pattern: Fat • UI • fully on client using JavaScript / AngularJS • Business logic • major parts run on client in JavaScript • at least persistence parts run on server • Communication • business logic on client calls business logic on server using (REST) webservices • offline mode possible Donnerstag, 25. April 13
  • 44. GWT integration pattern • Business logic on client could be done using GWT • fixes problem of maintainability • calls to server could be REST or GWT- RPC • Experimental approaches even do UI part in GWT using AngularJS binding Donnerstag, 25. April 13
  • 45. AngularJS fun facts • Also done by Google • like Dart and GWT • Codenames of releases include • radioactive-gargle • tofu-animation • flatulent-propulsion Donnerstag, 25. April 13
  • 46. AngularJS Checklist scales well Java only flexible layout implicit remote calls offline mode L&F out of the box backend reusable client side UI logic rich set of UI widgets has table widget simple tool chain integrates well Donnerstag, 25. April 13
  • 47. Wrap up • SPAs are a modern alternative to desktop applications • Developing SPAs with Java is a challenging task • Explicit Java / JavaScript integration might be an option for you • All of the frameworks presented are reasonable choices • which one is the right for you depends on your requirements and • the people who build your app Donnerstag, 25. April 13
  • 48. Questions / Discussion Oliver Zeigermann http://zeigermann.eu Donnerstag, 25. April 13