SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public1
Consuming Java EE
in Desktop, Web, and Mobile Frontends
Geertjan Wielenga
Oracle Developer Tools
geertjan.wielenga@oracle.com
@geertjanw
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public
Agenda  JavaScript/HTML5 Rich Client
Landscape
 Java EE 7
 Java EE + JavaScript
 Tools and Technologies
 Demos
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public3
JavaScript/HTML5 Rich Clients Landscape
 The thin client vs. rich client debate is pretty old…
» Thin Client
- All processing on server
- Round tripping to server
- Delays…
» Thin Client Rich Client
» - Complex, dynamic
» - Feature-rich UI
» - Access local resources
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public4
JavaScript/HTML5 Rich Clients Landscape
 Server side frameworks have ruled for a while
– Everything on the server
 Spring / Hibernate
 JSF
 Struts
 Tapestry
 AJAX is a mild shift to the client, “best of both worlds approach”
– Asynchronous partial page refresh solutions
 PrimeFaces
 Wicket
 GWT
 Vaadin
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public5
Demo: PrimeFaces, Java EE, and Maven
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public6
JavaScript/HTML5 Rich Clients Landscape
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public7
JavaScript/HTML5 Rich Clients Landscape
 Rich clients powered by JS/HTML appear to be making a comeback
– Improving JavaScript engines
 V8
 *Monkey
 Nashorn
– Better tools
 jQuery
 MV* Frameworks
 Chrome, FireFox
– Standards advancement
 CSS3
 HTML5
 WebSocket
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public8
Perhaps Not A Slam Dunk?
 Richer clients clearly better at some things
– Highly dynamic, interactive interfaces
– Complex, feature-rich UIs
– “Single page applications” (“Applets” )
 But perhaps not a panacea
– Heavily form/workflow driven applications
– Server-side rendering still a better bet for performance/reliability?
– JavaScript/HTML development is not without it’s pains…
– Server-side frameworks are a strong incumbent
 Co-existence in the short and long term?
– Islands of rich client functionality within server-centric UIs?
– Different strokes for different folks?
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public9
My Big Fat Rich-Client Architecture
 Very similar to client/server architecture of lore
– Client responsible for UI rendering, basic input validation, logic and state
– Server responsible for business logic, domain model, persistence
– Web/HTTP is glue that connects client and server
 Typical communication protocols
– REST for majority of cases
– WebSocket when full-duplex communication is needed
– JavaScript tools support REST well, but not WebSocket (yet)
 The typical (ideal?) data interchange format is JSON
 Java EE is a great server-side platform for this architecture…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public10
Java EE + JavaScript
EJB 3
Servlet
CDI
JPA
JAX-RS
BeanValidation
Java API for
WebSocket
Java API for
JSON
JMS JTA
JavaScript/HTML5
JAXB
JCA
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public11
JAX-RS
 REST development API for Java
 Server and client
 Annotation based, declarative
– @Path, @GET, @POST, @PUT, @DELETE, @PathParam,
@QueryParam, @Produces, @Consumes
 Pluggable and extensible
– Providers, filters, interceptors
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public12
JAX-RS Example
@Path("/atm/{cardId}")
public class AtmService {
@GET
@Path("/balance")
@Produces("text/plain")
public String balance(
@PathParam("cardId") String card,
@QueryParam("pin") String pin) {
return Double.toString(getBalance(card, pin));
}
...
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public13
Java API for WebSocket
 High level declarative API for WebSocket
 Both client and server-side
 Small, powerful API
– @ServerEndpoint, @OnOpen, @OnClose, @OnMessage,
@OnError, Session, Remote
 Pluggable and extensible
– Encoders, decoders, sub-protocols
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public14
WebSocket Example
@ServerEndpoint("/chat")
public class ChatBean {
Set<Session> peers = Collections.synchronizedSet(…);
@OnOpen
public void onOpen(Session peer) {
peers.add(peer);
}
@OnClose
public void onClose(Session peer) {
peers.remove(peer);
}
...
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public15
JavaScript Movers and Shakers
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public16
Demo: Backbone.js, Java EE, and Maven
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public17
Demo: Angular.js
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public18
Useful New Tools and Technologies
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public19
Useful New Tools and Technologies
 Post Processors
– Emmet
– SASS/LESS
– CoffeeScript
 Cordova/PhoneGap
 HTML5 Ecosystem
– Grunt
– Karma
– Bower
– Yeoman
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public20
Demo: SASS, LESS, Karma, Cordova
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public21
But Browser/Phone Is Not For Everyone…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public22
Summary
 JavaScript/HTML5 clients gaining traction as opposed to server-side
web frameworks
 Communication between the client and server happens via JSON
over REST or WebSocket
 Java EE well positioned as a JavaScript rich client backend,
especially with JAX-RS, the Java API for WebSocket and JSON-P
 Combining the two worlds is possible and positions applications for
deployment to mobile devices
 More options… more decisions… more technologies to evaluate
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public23

Contenu connexe

Tendances

Next gen tech from QuickXpert Infotech
Next gen tech   from QuickXpert InfotechNext gen tech   from QuickXpert Infotech
Next gen tech from QuickXpert InfotechNarendra Jakhotia
 
Oracle ADF Architecture TV - Design - Task Flow Overview
Oracle ADF Architecture TV - Design - Task Flow OverviewOracle ADF Architecture TV - Design - Task Flow Overview
Oracle ADF Architecture TV - Design - Task Flow OverviewChris Muir
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015Edward Burns
 
Oracle ADF Architecture TV - Design - ADF BC Application Module Design
Oracle ADF Architecture TV - Design - ADF BC Application Module DesignOracle ADF Architecture TV - Design - ADF BC Application Module Design
Oracle ADF Architecture TV - Design - ADF BC Application Module DesignChris Muir
 
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable ArtifactsOracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable ArtifactsChris Muir
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationIMC Institute
 
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project LayoutsOracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project LayoutsChris Muir
 
Oracle ADF Architecture TV - Design - Task Flow Navigation Options
Oracle ADF Architecture TV - Design - Task Flow Navigation OptionsOracle ADF Architecture TV - Design - Task Flow Navigation Options
Oracle ADF Architecture TV - Design - Task Flow Navigation OptionsChris Muir
 
Oracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error HandlingOracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error HandlingChris Muir
 
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot David Delabassee
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesChris Muir
 
J2EE and Servlet
J2EE and Servlet J2EE and Servlet
J2EE and Servlet Rishikesh .
 
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction OptionsOracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction OptionsChris Muir
 
Oracle ADF Architecture TV - Design - Architecting for PLSQL Integration
Oracle ADF Architecture TV - Design - Architecting for PLSQL IntegrationOracle ADF Architecture TV - Design - Architecting for PLSQL Integration
Oracle ADF Architecture TV - Design - Architecting for PLSQL IntegrationChris Muir
 
Oracle ADF Architecture TV - Design - Project Dependencies
Oracle ADF Architecture TV - Design - Project DependenciesOracle ADF Architecture TV - Design - Project Dependencies
Oracle ADF Architecture TV - Design - Project DependenciesChris Muir
 
Ankara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADFAnkara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADFAnkara JUG
 

Tendances (18)

Next gen tech from QuickXpert Infotech
Next gen tech   from QuickXpert InfotechNext gen tech   from QuickXpert Infotech
Next gen tech from QuickXpert Infotech
 
Oracle ADF Architecture TV - Design - Task Flow Overview
Oracle ADF Architecture TV - Design - Task Flow OverviewOracle ADF Architecture TV - Design - Task Flow Overview
Oracle ADF Architecture TV - Design - Task Flow Overview
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
 
Oracle ADF Architecture TV - Design - ADF BC Application Module Design
Oracle ADF Architecture TV - Design - ADF BC Application Module DesignOracle ADF Architecture TV - Design - ADF BC Application Module Design
Oracle ADF Architecture TV - Design - ADF BC Application Module Design
 
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable ArtifactsOracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web Application
 
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project LayoutsOracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
 
Oracle ADF Architecture TV - Design - Task Flow Navigation Options
Oracle ADF Architecture TV - Design - Task Flow Navigation OptionsOracle ADF Architecture TV - Design - Task Flow Navigation Options
Oracle ADF Architecture TV - Design - Task Flow Navigation Options
 
Oracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error HandlingOracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error Handling
 
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best Practices
 
J2EE and Servlet
J2EE and Servlet J2EE and Servlet
J2EE and Servlet
 
Java ee introduction
Java ee introductionJava ee introduction
Java ee introduction
 
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction OptionsOracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
 
Jsp tutorial
Jsp tutorialJsp tutorial
Jsp tutorial
 
Oracle ADF Architecture TV - Design - Architecting for PLSQL Integration
Oracle ADF Architecture TV - Design - Architecting for PLSQL IntegrationOracle ADF Architecture TV - Design - Architecting for PLSQL Integration
Oracle ADF Architecture TV - Design - Architecting for PLSQL Integration
 
Oracle ADF Architecture TV - Design - Project Dependencies
Oracle ADF Architecture TV - Design - Project DependenciesOracle ADF Architecture TV - Design - Project Dependencies
Oracle ADF Architecture TV - Design - Project Dependencies
 
Ankara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADFAnkara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADF
 

Similaire à Consuming Java EE in Desktop, Web, and Mobile Frontends

Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Reza Rahman
 
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentHow Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentBruno Borges
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in actionAnkara JUG
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
 
Ugf9796 weblogic for ebs and obiee
Ugf9796 weblogic for ebs and obieeUgf9796 weblogic for ebs and obiee
Ugf9796 weblogic for ebs and obieeBerry Clemens
 
Servidores de Aplicação: por que ainda precisamos deles?
Servidores de Aplicação: por que ainda precisamos deles?Servidores de Aplicação: por que ainda precisamos deles?
Servidores de Aplicação: por que ainda precisamos deles?Bruno Borges
 
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015Pavel Bucek
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013Martin Fousek
 
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...Dr. Wilfred Lin (Ph.D.)
 
Presentation oracle exalogic elastic cloud
Presentation   oracle exalogic elastic cloudPresentation   oracle exalogic elastic cloud
Presentation oracle exalogic elastic cloudsolarisyougood
 
Oracle Weblogic for EBS and obiee (R12.2)
Oracle Weblogic for EBS and obiee (R12.2)Oracle Weblogic for EBS and obiee (R12.2)
Oracle Weblogic for EBS and obiee (R12.2)Berry Clemens
 
Introducing Java 8
Introducing Java 8Introducing Java 8
Introducing Java 8PT.JUG
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxToon Koppelaars
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_daviddTakashi Ito
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production EnvironmentsBruno Borges
 
Implementing Data Caching and Data Synching Using Oracle MAF
Implementing Data Caching and Data Synching Using Oracle MAFImplementing Data Caching and Data Synching Using Oracle MAF
Implementing Data Caching and Data Synching Using Oracle MAFSteven Davelaar
 
Microservices, Data Services and Containers for Cloud Native Architectures (D...
Microservices, Data Services and Containers for Cloud Native Architectures (D...Microservices, Data Services and Containers for Cloud Native Architectures (D...
Microservices, Data Services and Containers for Cloud Native Architectures (D...ragss
 

Similaire à Consuming Java EE in Desktop, Web, and Mobile Frontends (20)

Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
Oracle JET overview
Oracle JET overviewOracle JET overview
Oracle JET overview
 
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentHow Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web Development
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
Ugf9796 weblogic for ebs and obiee
Ugf9796 weblogic for ebs and obieeUgf9796 weblogic for ebs and obiee
Ugf9796 weblogic for ebs and obiee
 
Servidores de Aplicação: por que ainda precisamos deles?
Servidores de Aplicação: por que ainda precisamos deles?Servidores de Aplicação: por que ainda precisamos deles?
Servidores de Aplicação: por que ainda precisamos deles?
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
 
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
 
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško VukmanovićJavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
 
Presentation oracle exalogic elastic cloud
Presentation   oracle exalogic elastic cloudPresentation   oracle exalogic elastic cloud
Presentation oracle exalogic elastic cloud
 
Oracle Weblogic for EBS and obiee (R12.2)
Oracle Weblogic for EBS and obiee (R12.2)Oracle Weblogic for EBS and obiee (R12.2)
Oracle Weblogic for EBS and obiee (R12.2)
 
Introducing Java 8
Introducing Java 8Introducing Java 8
Introducing Java 8
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_davidd
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production Environments
 
Implementing Data Caching and Data Synching Using Oracle MAF
Implementing Data Caching and Data Synching Using Oracle MAFImplementing Data Caching and Data Synching Using Oracle MAF
Implementing Data Caching and Data Synching Using Oracle MAF
 
Microservices, Data Services and Containers for Cloud Native Architectures (D...
Microservices, Data Services and Containers for Cloud Native Architectures (D...Microservices, Data Services and Containers for Cloud Native Architectures (D...
Microservices, Data Services and Containers for Cloud Native Architectures (D...
 

Plus de Geertjan Wielenga

The Long Walk to Apache NetBeans
The Long Walk to Apache NetBeansThe Long Walk to Apache NetBeans
The Long Walk to Apache NetBeansGeertjan Wielenga
 
Coding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETCoding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETGeertjan Wielenga
 
JFall 2016: Oracle JET Session
JFall 2016: Oracle JET SessionJFall 2016: Oracle JET Session
JFall 2016: Oracle JET SessionGeertjan Wielenga
 
Oracle JET, with JET Mobile Content
Oracle JET, with JET Mobile ContentOracle JET, with JET Mobile Content
Oracle JET, with JET Mobile ContentGeertjan Wielenga
 
10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScriptGeertjan Wielenga
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JETGeertjan Wielenga
 
geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"Geertjan Wielenga
 
Surviving Life in the JavaScript Ecosystem
Surviving Life in the JavaScript EcosystemSurviving Life in the JavaScript Ecosystem
Surviving Life in the JavaScript EcosystemGeertjan Wielenga
 
Oracle JET: Enterprise-Ready JavaScript Toolkit
Oracle JET: Enterprise-Ready JavaScript ToolkitOracle JET: Enterprise-Ready JavaScript Toolkit
Oracle JET: Enterprise-Ready JavaScript ToolkitGeertjan Wielenga
 
NetBeans Workshop at Hanze University of Applied Science, Groningen
NetBeans Workshop at Hanze University of Applied Science, GroningenNetBeans Workshop at Hanze University of Applied Science, Groningen
NetBeans Workshop at Hanze University of Applied Science, GroningenGeertjan Wielenga
 
Coding for Desktop & Mobile with HTML5 & Java EE
Coding for Desktop & Mobile with HTML5 & Java EECoding for Desktop & Mobile with HTML5 & Java EE
Coding for Desktop & Mobile with HTML5 & Java EEGeertjan Wielenga
 

Plus de Geertjan Wielenga (20)

The Long Walk to Apache NetBeans
The Long Walk to Apache NetBeansThe Long Walk to Apache NetBeans
The Long Walk to Apache NetBeans
 
Java Master Class
Java Master ClassJava Master Class
Java Master Class
 
Coding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETCoding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JET
 
Session at Oredev 2016.
Session at Oredev 2016.Session at Oredev 2016.
Session at Oredev 2016.
 
JFall 2016: Oracle JET Session
JFall 2016: Oracle JET SessionJFall 2016: Oracle JET Session
JFall 2016: Oracle JET Session
 
Slovenian Oracle User Group
Slovenian Oracle User GroupSlovenian Oracle User Group
Slovenian Oracle User Group
 
Imworld.ro
Imworld.roImworld.ro
Imworld.ro
 
Oracle User Group Holland
Oracle User Group HollandOracle User Group Holland
Oracle User Group Holland
 
State of NetBeans
State of NetBeansState of NetBeans
State of NetBeans
 
Oracle JET, with JET Mobile Content
Oracle JET, with JET Mobile ContentOracle JET, with JET Mobile Content
Oracle JET, with JET Mobile Content
 
10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JET
 
Oracle JET
Oracle JETOracle JET
Oracle JET
 
geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"
 
Technology Evangelism
Technology EvangelismTechnology Evangelism
Technology Evangelism
 
Technology evangelist
Technology evangelistTechnology evangelist
Technology evangelist
 
Surviving Life in the JavaScript Ecosystem
Surviving Life in the JavaScript EcosystemSurviving Life in the JavaScript Ecosystem
Surviving Life in the JavaScript Ecosystem
 
Oracle JET: Enterprise-Ready JavaScript Toolkit
Oracle JET: Enterprise-Ready JavaScript ToolkitOracle JET: Enterprise-Ready JavaScript Toolkit
Oracle JET: Enterprise-Ready JavaScript Toolkit
 
NetBeans Workshop at Hanze University of Applied Science, Groningen
NetBeans Workshop at Hanze University of Applied Science, GroningenNetBeans Workshop at Hanze University of Applied Science, Groningen
NetBeans Workshop at Hanze University of Applied Science, Groningen
 
Coding for Desktop & Mobile with HTML5 & Java EE
Coding for Desktop & Mobile with HTML5 & Java EECoding for Desktop & Mobile with HTML5 & Java EE
Coding for Desktop & Mobile with HTML5 & Java EE
 

Dernier

Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 

Dernier (20)

Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 

Consuming Java EE in Desktop, Web, and Mobile Frontends

  • 1. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public1 Consuming Java EE in Desktop, Web, and Mobile Frontends Geertjan Wielenga Oracle Developer Tools geertjan.wielenga@oracle.com @geertjanw
  • 2. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public Agenda  JavaScript/HTML5 Rich Client Landscape  Java EE 7  Java EE + JavaScript  Tools and Technologies  Demos
  • 3. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public3 JavaScript/HTML5 Rich Clients Landscape  The thin client vs. rich client debate is pretty old… » Thin Client - All processing on server - Round tripping to server - Delays… » Thin Client Rich Client » - Complex, dynamic » - Feature-rich UI » - Access local resources
  • 4. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public4 JavaScript/HTML5 Rich Clients Landscape  Server side frameworks have ruled for a while – Everything on the server  Spring / Hibernate  JSF  Struts  Tapestry  AJAX is a mild shift to the client, “best of both worlds approach” – Asynchronous partial page refresh solutions  PrimeFaces  Wicket  GWT  Vaadin
  • 5. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public5 Demo: PrimeFaces, Java EE, and Maven
  • 6. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public6 JavaScript/HTML5 Rich Clients Landscape
  • 7. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public7 JavaScript/HTML5 Rich Clients Landscape  Rich clients powered by JS/HTML appear to be making a comeback – Improving JavaScript engines  V8  *Monkey  Nashorn – Better tools  jQuery  MV* Frameworks  Chrome, FireFox – Standards advancement  CSS3  HTML5  WebSocket
  • 8. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public8 Perhaps Not A Slam Dunk?  Richer clients clearly better at some things – Highly dynamic, interactive interfaces – Complex, feature-rich UIs – “Single page applications” (“Applets” )  But perhaps not a panacea – Heavily form/workflow driven applications – Server-side rendering still a better bet for performance/reliability? – JavaScript/HTML development is not without it’s pains… – Server-side frameworks are a strong incumbent  Co-existence in the short and long term? – Islands of rich client functionality within server-centric UIs? – Different strokes for different folks?
  • 9. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public9 My Big Fat Rich-Client Architecture  Very similar to client/server architecture of lore – Client responsible for UI rendering, basic input validation, logic and state – Server responsible for business logic, domain model, persistence – Web/HTTP is glue that connects client and server  Typical communication protocols – REST for majority of cases – WebSocket when full-duplex communication is needed – JavaScript tools support REST well, but not WebSocket (yet)  The typical (ideal?) data interchange format is JSON  Java EE is a great server-side platform for this architecture…
  • 10. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public10 Java EE + JavaScript EJB 3 Servlet CDI JPA JAX-RS BeanValidation Java API for WebSocket Java API for JSON JMS JTA JavaScript/HTML5 JAXB JCA
  • 11. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public11 JAX-RS  REST development API for Java  Server and client  Annotation based, declarative – @Path, @GET, @POST, @PUT, @DELETE, @PathParam, @QueryParam, @Produces, @Consumes  Pluggable and extensible – Providers, filters, interceptors
  • 12. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public12 JAX-RS Example @Path("/atm/{cardId}") public class AtmService { @GET @Path("/balance") @Produces("text/plain") public String balance( @PathParam("cardId") String card, @QueryParam("pin") String pin) { return Double.toString(getBalance(card, pin)); } ...
  • 13. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public13 Java API for WebSocket  High level declarative API for WebSocket  Both client and server-side  Small, powerful API – @ServerEndpoint, @OnOpen, @OnClose, @OnMessage, @OnError, Session, Remote  Pluggable and extensible – Encoders, decoders, sub-protocols
  • 14. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public14 WebSocket Example @ServerEndpoint("/chat") public class ChatBean { Set<Session> peers = Collections.synchronizedSet(…); @OnOpen public void onOpen(Session peer) { peers.add(peer); } @OnClose public void onClose(Session peer) { peers.remove(peer); } ...
  • 15. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public15 JavaScript Movers and Shakers
  • 16. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public16 Demo: Backbone.js, Java EE, and Maven
  • 17. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public17 Demo: Angular.js
  • 18. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public18 Useful New Tools and Technologies
  • 19. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public19 Useful New Tools and Technologies  Post Processors – Emmet – SASS/LESS – CoffeeScript  Cordova/PhoneGap  HTML5 Ecosystem – Grunt – Karma – Bower – Yeoman
  • 20. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public20 Demo: SASS, LESS, Karma, Cordova
  • 21. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public21 But Browser/Phone Is Not For Everyone…
  • 22. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public22 Summary  JavaScript/HTML5 clients gaining traction as opposed to server-side web frameworks  Communication between the client and server happens via JSON over REST or WebSocket  Java EE well positioned as a JavaScript rich client backend, especially with JAX-RS, the Java API for WebSocket and JSON-P  Combining the two worlds is possible and positions applications for deployment to mobile devices  More options… more decisions… more technologies to evaluate
  • 23. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public23