JavaFX Versus HTML5 - JavaOne 2014

Ryan Cuprak
Ryan CuprakCPG & Retail, Formulation R&D Development Senior Manager
JavaFX Versus 
HTML5 
Ryan Cuprak, Dassault Systemès 
David Grieve, Oracle
Agenda 
• Demo Application 
• Technical Comparison 
• JavaFX in Perspective 
• HTML5 in Perspective 
• Analysis 
• Integration 
• Summary 
Both designed and engineered using Dassault 
Systèmes CATIA software! 
https://github.com/rcuprak/n34sailor
Demo Application
Demo Application 
Why not Swing? 
• JavaFX replaces Swing 
• Swing was a 1990s technology – different era 
• Swing has significant shortcomings: 
• No support for touch 
• Hard to customize appearance 
• JTable feature poor with complex code 
• No support for animation 
• No data binding support 
• No support for animations 
• Some customization require changes to L&F classes
Demo Application 
Background 
• HTML5 has arrived on the desktop 
• HTML5 has arrived on mobile 
• HTML5 apps are apps! 
• Logic written in JavaScript 
• UI HTML5/CSS3 
• HTML5 apps are gaining device 
support: 
• Compass/GPS/Accelerometers/BlueToo 
th
Demo Application 
What type of demo application? 
• Mobile – using HTML5 and Apache Cordova 
• Apps not websites! 
• HTML5 enables app development 
• Excitement is around app development 
• Rich user experiences 
• Not talking about JSF + HTML5
Demo Application 
What type of demo application? 
Not this type of web app!
Demo Application 
Sailboat Racing 
Start/Finish
Demo Application 
Architecture 
Interface 
Application 
Entities 
Infrastructure 
Apache 
Cordova 
EJB 
JPA Entities 
JPA 
JavaFX JAX-RS WebSocket 
JMS CDI
Demo Application 
Sailboat Racing Overview 
• Committee boat sets the course and 
announces it via radio. 
• Boats register via radio specifying their class. 
• Start sequence for class: 
• Warning horn is sounded 
• Start horn is sounded (boats cross start line) 
• Start sequence repeated for next class. 
• Committee boat monitors progress and 
weather. 
• Race course altered if wind dies or conditions 
deteriorate. 
• Finish time for each boat is registered at the 
end of the race 
• Final results are calculated.
Mobile Overview 
Native HTML5 Apps 
• Single Page Application (SPA) 
wrapped in Native application. 
• Native application displays a 
WebView – embedded browser. 
• Logic: 
• JavaScript 
• JavaScript platform extensions 
• UI 
• HTML5 markup 
• SVG 
• Canvas 
• WebGL 
• All assets are bundled with the 
application.
Mobile Overview 
Native HTML5 vs. Web Apps 
HTTP Session 
JSF/JSP/Facelets
Demo Application 
UI Mockup
Demo Application 
Technologies 
• JavaFX 
• Vanilla JavaFX– designed using Scene 
Builder 2.0 
• JAX-RS 2.0 (Jersey) 
• WebSockets (Tyrus) 
• Java API for JSON Processing 
• HTML5 
• Apache Cordova 
(Android/iOS/Windows/Tizen/BlackBe 
rry) 
• JQuery 
• JQuery Mobile 
• Knockout JS
Mobile Overview 
Framework License 
jQuery Mobile 
http://jquerymobile.com 
MIT 
Sencha Touch 
http://sencha.com 
Commercial(Free) & Open 
Source (GPLv3) 
Intel App Framework 
http://app-framework-software.intel.com 
MIT 
Ionic 
http://ionicframework.com 
MIT 
M-Project 
http://www.the-m-project.org 
MIT 
Kendo UI 
http://www.telerik.com 
Commercial 
Twitter Bootstrap 3 
http://getbootstrap.com 
MIT 
Mobile Frameworks
Mobile Overview 
Secha Architect
Demo Application 
Material Differences 
• JavaFX 
• No camera integration 
• No GPS integration 
• Connectivity information (network availability/type) 
• HTML5 
• UI layout 
• Background threading 
• Browser support – IndexDB
Technical Comparison
Technical Comparison 
High Level Overview 
• HTML5 
• UI constructed using HTML5 
markup 
• Logic implemented using JavaScript 
• Tooling: NetBeans 
• JavaFX 
• UI constructed using FXML 
• Logic implemented using Java 
• Tooling: NetBeans, Scene Builder 2
Technical Comparison 
JavaFX: Architecture with Controllers 
Login Map Weather Navigation Chat 
MainMen 
u 
Race 
Register 
Main 
fxml fxml fxml fxml 
fxml 
fxml 
fxml 
fxml
Technical Comparison 
JavaFX: Controller Architecture
Technical Comparison 
JavaFX: UI Flow 
1. JoinRace.fxml invokes confirmAction(ActionEvent) 
2. RaceController sets the data on RaceController.
Technical Comparison 
HTML5: SPA Architecture 
index.html 
<html><body> 
<div id=“page”> 
<a href=“menu.html”> 
Menu 
</a> 
</div> 
</body></html> 
menu.html 
<html><body> 
<div id=“page”> 
<a href=“info.html”> 
Info </a> 
</div> 
</body></html> 
<a href=“info.html”> 
Info </a> 
info.html 
<html><body> 
<Info 
div id=“page”> 
Info 
</div> 
</body></html>
Technical Comparison 
HTML5: Page Flow 
index.html 
account.html 
login.html menu.html 
joinRace.html 
register.html 
results.html 
welcome.html 
weather. chat.html info.html tracking.html
Technical Comparison 
HTML5: UI Flow 
App.js 
joinRace.html 
Race.js 
- getRaces() 
- pageBeforeJoinRaces() 
- joinSelectedRace() 
menu.html 
- pageBeforeShow() 
- pageChange() 
1. menu.html - <a id="raceMenu" onclick="getRaces();">Join Race</a> 
2. app.js – pageChange() 
3. app.js – pageBeforeShow() -> Race.js getRaces() 
4. joinRace.html - <button type="button" id="Login" onclick="joinSelectedRace();" 
value="Login">Confirm</button>
Technical Comparison 
HTML5: UI Transitions 
Changing to another page: 
• Processing a page before rendering:
Technical Comparison 
HTML5: Apache Cordova + JQuery Mobile Initialization 
App “states” are 
different.
Technical Comparison 
HTML5: Loading Data 
JQuery Mobile – varies by 
JavaScript library
Technical Comparison 
HTML5: Using Knockout 
Using Bindings
Technical Comparison 
HTML5: Knockout Complications 
Converting data to JSON becomes more complicated:
Technical Comparison 
JavaFX: Data Binding 
Bound using 
@FXML 
@FXML 
void userNameEntered(ActionEvent)
Technical Comparison 
JavaFX: Binding 
Conditionally enable 
the login button
Technical Comparison 
Busy Indicator
Technical Comparison 
JavaFX: Busy Indicator
Technical Comparison 
JavaFX: Busy Indicator
Technical Comparison 
HTML5: Busy Indicator – Animation Markup
Technical Comparison 
HTML5: Busy Indicator – Animation with CSS3
Technical Comparison 
HTML5: Tables 
JQuery plug: Data Tables 
http://www.datatables.net
Technical Comparison 
HTML5: Tables
Technical Comparison 
JavaFX: Tables
Technical Comparison 
JavaFX: Tables
Technical Comparison 
Server Communication 
Client 
Java EE 7 
App Server 
REST 
Request/Response 
Web Sockets 
Bidirectional 
Restful Web Service 
Web Socket Endpoint
Technical Comparison 
Server Communication 
• JavaFX 
• Not part of Java 8. 
• Websocket: Project Tyrus 
https://tyrus.java.net/index.html 
• REST: Project Jersey 
https://jersey.java.net 
• JSON Processing 
https://jsonp.java.net 
• HTML5 
• REST – native support: 
• Xmlhttp – used to issue AJAX calls. 
• WebSocket – native support: 
• WebSocket – used to register callbacks and send data.
Technical Comparison 
HTML5: WebSocket Support 
http://caniuse.com/#search=webso 
Android Version Date WebSocket Deployed 
4.4 JellyBean July 24, 2013 No 26.5% (80% can’t) 
4.4 KitKat October 31, 2013 Yes 20% (8/2014)
Technical Comparison 
Java: REST Invocation Java Objects! 
Java API for 
JSON 
JAX-RS Client
Technical Comparison 
HTML5: REST Invocation
Technical Comparison 
HTML5: WebSocket Support
Technical Comparison 
JavaFX: WebSocket Support
Technical Comparison 
HTML5: Layout Challenges
Apache Cordova 
HTML5: Device Access
Technical Comparison 
Challenges 
HTML5 Development Challenges 
• Null versus undefined 
• Different approaches to defining “classes” 
• Global namespace 
• IDE coding support 
• Threading – Web Workers cannot update the DOM 
• IndexDB support/access 
• Recovering from fatal errors (application “hung”) 
JavaFX Development Challenges 
• Mobile support 
• Interaction with hardware
JavaFX in Perspective
HTML5 & JavaFX 
JavaFX Misconceptions 
• JavaFX is irrelevant with the advent of HTML5. 
• Java on the desktop is dead. 
• JavaFX and HTML5 are mutually exclusive. 
• Java does not have good graphics performance. 
• JavaFX is only for rich media applications – not desktop apps. 
• JavaFX is meant for only building games and mobile apps. 
• You would never use JavaFX in a business application.
HTML5 & JavaFX 
Legacy Technologies 
• Java3D, JAI, and JMF are dead. 
• Java3D, JAI, and JMF have no relationship to JavaFX. 
• JavaFX is not like these technologies: 
• Cross-platform – features are available everywhere. 
• Integrated into the JRE – no separate download/versioning/etc. 
• JavaFX includes support for common video and audio formats.
HTML5 & JavaFX 
• Retained mode 
• SceneGraph 
• Scene Builder Tool 
• 60+ components 
• CSS skinning 
• Built-in animation 
support 
• Audio/video support 
• Multi-touch 
• 3D Tooling Support 
with SceneBuilder 
JavaFX Key Features
HTML5 & JavaFX 
JavaFX in Perspective 
Differentiating feature: Scene graph is at the 
core of the API. 
• UI widgets are nodes like any other node! 
• UI widgets are thus like any other node in the 
scene graph 
• Can be animated, transformed, filtered, 
leverage customized event handling
HTML5 in Perspective
HTML5 & JavaFX 
HTML5 Major Features 
• 2D Canvas 
• WebGL – technically not part of HTML5 
• CCS3 – WebFonts, Transformations, CSS 
Animation 
• WebSockets 
• Web Workers – background threading 
• Data storage – file system access, local storage, 
app cache
HTML5 & JavaFX 
HTML5 vs. Traditional Web Applications 
• Not page centric like JSF/JSP/Servlets. 
• Single Page Application (SPA) – the app is the page. 
• Client is stateful and not stateless. 
• Application is coded in JavaScript. 
• True asynchronous communication with the server. 
• Application may not have a backend server. 
• Maybe sold via an App store.
HTML5 & JavaFX 
HTML5 Applied 
• Many mobile apps are hybrids: 
• Native application shell with HTML5 content. 
• PhoneGap aka Apache Cordova 
• Native application development dominates mobile: 
• Mobile phones, while powerful, are not as powerful as 2 GHz i3. 
• Mobiles devices are RAM limited – garbage collection and RAM 
• Android support native apps (C/C++) – NDK. 
• Performance/usability issues - FaceBook went native.
Technical Comparison
HTML5 & JavaFX 
Technical Comparison Agenda 
• Overview 
• Feature Support 
• Rendering APIs 
• Multimedia 
• Controls 
• Animation 
• 3D Comparison
HTML5 & JavaFX 
Overview: Comparison Challenge 
• HTML5 is amorphous: 
• Basic set of base technologies (SVG, Canvas, WebGL, WebSockets, 
WebWorker). 
• Additional functionality provided by open source libraries: 
• JQuery 
• Three.js 
• Tween.js 
• Almost impossible to argue HTML5 can’t do X. 
• JavaFX is fixed: 
• More robust core features. 
• Easier to use developmentally. 
• Smaller ecosystem of components.
HTML5 & JavaFX 
Overview: HTML5 Limitations 
• JavaScript language 
• Browser challenges 
• Custom browser extensions 
• Concurrency 
• Time zone detection 
• Tooling challenges 
• Patent infringement/ IP theft.
HTML5 & JavaFX 
Overview: JavaFX Limitations 
• No smart phone strategy. 
• RoboVM– opens up iOS! 
http://www.robovm.org 
• Incomplete – still a work in progress. 
• Core features dependent upon Oracle resourcing. 
• Missing features: 
• geo-location, device orientation, accelerometers, 
camera capture 
• Perception – JavaFX 1.0.
HTML5 & JavaFX 
JavaFX HTML5 
Deployment Strategies 
Mac App Store ✔ ✔ 
Microsoft App 
Store 
✔ ✔ 
Android Stores ✖ ✔ 
iTunes  ✔ 
Browser  ✔
HTML5 & JavaFX 
HTML5 Feature Support 
Feature IE Chrome FireFox Safari 
Canvas IE 9 26 21 5.1 
WebGL ✖ 26   
Web 
10 26 21 6.0 
Sockets 
SVG 9 26 21 5.1 
Offline 
10 26 21 5.1 
Apps 
Animation 10 26 21 6.0
HTML5 & JavaFX 
Rendering 
• HTML5 Canvas element is a 2D draw surface – 
similar to Java 2D, MacOS X Quartz, QuickDraw, 
etc. 
• HTML5 Canvas is immediate – JavaFX retained. 
• HTML5 Canvas similar to JavaFX Canvas. 
• HTML5 Canvas does not support hit detection.
HTML5 & JavaFX 
Rendering 
JavaFX HTML5 
javafx.scene.Scene 
javafx.scene.canvas.Canvas 
SVG 
Canvas
HTML5 & JavaFX 
2D Canvas: JavaFX vs. HTML5 
• Similarities: 
• Immediate mode rendering. 
• API almost exact match. 
• JavaFX: 
• Canvas can participate in scene graph and also JavaFX 3D. 
• Supports SVG paths. 
• HTML5: 
• Lacks fill support for arcs or polygons.
HTML5 & JavaFX 
Feature Integration 
JavaFX HTML5 
Scene 
Canvas Video 
Audio 
Canvas 
SVG 
Video 
CSS Audio 
Feature Layout not 
integrated. 
3D 
WebGL 
(3D)
HTML5 & JavaFX 
Feature Integration 
Video and Canvas integrated via layout.
HTML5 & JavaFX 
SVG 
• SVG – 2D vector image support (.svg) 
• XML based: supports vector, raster, and text. 
• SVG 1.0 release in 2001. 
• SVG 2.0 targeted for 8/2014. 
• Can be compressed using gzip. 
• Browser support is not robust 
• IE8 didn’t provide SVG support 
• Modules lacking full support: Font, Filter, Clip, Cursor 
• Include in HTML using <embed>, <object>, or <iframe>
HTML5 & JavaFX 
HTML5: SVG 
• Multiple tools can export to SVG: 
• Adobe Illustrator 
• OmniGraffle Professional 
• CorelDraw 
• InkScape (open source) 
• SVG format has a similar structure. 
• Can be manipulated from JavaScript.
HTML5 & JavaFX 
Controls 
• HTML5 and JavaFX have rich suite of controls. 
• Binding: 
• JavaFX – built-in 
• HTML5 – need library like knockout.js. 
• HTML5 lacks a windowing API. 
• No layout managers, windows, menu bars, etc. 
• No framework for extending browser controls. 
• Controls vary between browsers. 
• No support for internationalization. 
• JavaFX controls are node in the scene graph.
HTML5 & JavaFX 
Tables 
• HTML5 
• No native “grid” data grid component (JTable/Excel equivalent) 
• You cannot drag and drop <tr></tr> to rearrange a table. 
• Challenges: Merging cells (row/column), copy paste, selection. 
• JavaFX 
• Powerful table component – joining cells, selection, copy paste, 
drag and drop. 
• Supports table joining in JavaFX 8.
HTML5 & JavaFX 
Multimedia Support 
• Video/audio codec support determined by patents. 
• Oracle licenses formats for JavaFX. 
• HTML5 supports no audio/video codecs by default. 
• JavaFX provides a known set of codecs. 
• Built on top of Gstreamer (http://www.gstreamer.com)
HTML5 & JavaFX 
Video Codecs Support Matrix 
JavaFX HTML5 
Chrome FireFox Safari IE 
FLV (VP6 
video/mp3 
audio) 
✔ ✔ ✔ ✖ ✖ 
H.264 ✔ ✔ ✔ ✔ ✔ 
Theora ✖ ✔ ✔ ✖ ✖ 
VP8 (WebM) ✖ ✔ ✔ ✖ ✖ 
VP9 (WebM) ✖ ✔ ✖ ✖ ✖
HTML5 & JavaFX 
Video Codec Support 
• HTML5 video includes controller 
play/stop/progress/seek/volume. 
• HTML5 – easy to fallback to plugins (Flash) where necessary. 
• JavaFX – does not include controller UI. 
• Neither technology can access individual video Frames!
JavaFX & HTML5 
Audio Codecs Support Matrix 
JavaFX HTML5 
Chrome FireFox Safari IE 
ACC ✔ ✔  ✔ ✔ 
AIFF ✔ ✖ ✖ ✖ ✖ 
Ogg Opus ✖ ✔ ✔ ✖ ✖ 
Ogg Vorbis ✖ ✔ ✔ ✔ ✖ 
MP3 ✔ ✔  ✔ ✔ 
WAV PCM ✔ ✔ ✔ ✔ ✖ 
WebM ✖ ✖ ✔ ✖ ✖
HTML5 & JavaFX 
Animation 
• HTML5 animation is primitive. 
• requestNextAnimationFrame callback 
• You are responsible for everything else! 
• Callback not supported on all platforms - polyfill can suffer 
performance degradations 
• Must either build a toolkit or use JavaScript animation library like 
tween.js. 
• JavaFX 
• Animation framework built into the platform 
• All nodes can be animated – include UI elements. 
• javafx.animation.Animation – base class – two subclasses.
HTML5 & JavaFX 
JavaFX Animation Support 
• Robust built-in library for animation. 
• Leverages JavaFX binding capabilities 
• JavaFX Animation subclasses: 
• Parallel/Sequential 
• Timeline/Keyframes 
• Transition: FadeTransition, FillTransition, ParallelTransition, 
PathTransition, PauseTransition, RotateTransition, ScaleTransition, 
SequentialTransition, StrokeTransition, TranslateTransition
HTML5 & JavaFX 
HTML5 Animation Support
HTML5 & JavaFX 
3D Support 
• JavaFX 8 and HTML5 WebGL both support 3D. 
• JavaFX 8 3D support: 
• Built on top of OpenGL/Direct 3D 
• Provides a built-in scene graph 
• Decora – DSL Shader language 
• HTML5 JavaFX WebView does not support WebGL. 
• JavaFX 3D – 3D without the overhead.
HTML5 & JavaFX 
WebGL 
• WebGL developed by Khronos Group 
• Based on OpenGL ES 2.0 – embedded OpenGL API used on iOS 
and Android. 
• API is low level – must develop or use framework on top of 
WebGL. 
• GLGE: http://www.glge.org 
• SceneJS: http://www.scenejs.org 
• CubicVR: http://www.cubicvr.org 
• Three.js: http://www.threejs.org 
• Not supported in all browsers. 
• IE support has been lacking – first version IE 11. 
• Safari requires the user enable WebGL (Developer menu). 
• Shaders written in C-like language
HTML5 & JavaFX 
three.js vs. JavaFX 3D 
Feature JavaFX WebGL three.js 
Light 7 2 
Built-in Shapes 25 4 
WebGL – no JavaScript libaries 
Only triangle meshes 
No picking API, lines, etc. (currently) 
JavaFX 
Highlevel API – use jogl for OpenGL capabilities.
HTML5 & JavaFX 
Performance Tuning 
• JVM can be tuned for 
performance. 
• HTML5 lacks tuning support. 
• Cannot configure garbage 
collection. 
• Each browser is “different.” 
• Limited tooling for exploring 
JavaScript VM problems. 
http://www.html5rocks.com/en/tutorials/speed/static-mem-pools
Integration
HTML5 & JavaFX 
Integrating JavaFX & HTML5 
• CSS for skinning components. 
• WebView for rendering HTML5 content. 
• SVG rendering support.
HTML5 & JavaFX 
JavaFX CSS Control Skinning 
• JavaFX uses CSS for skinning. 
• JavaFX uses its own CSS attributes. 
• JavaFX CSS reader is not fully compliant. 
• Graphic artist will must learn JavaFX CSS properties. 
• JavaFX skinning properties don’t support animation.
HTML5 & JavaFX 
JavaFX CSS Control Skinning 
JavaFX 
HTML5
HTML5 & JavaFX 
JavaFX CSS Control Skinning
HTML5 & JavaFX 
HTML5 Property HTML5 Value JavaFX Property JavaFX Value 
background -webkit-gradient( 
linear, 
left top, left 
bottom, 
from(#3e779d), 
to(#65a9d7)) 
-fx-background-color 
linear-gradient(to 
bottom, 
rgb(62,119,157), 
rgb(101,169,215)) 
border-radius 8px -fx-border-radius 8px 
box-shadow rgba(0,0,0,1) 0 
1px 0 
-fx-effect dropshadow(one-pass- 
box,black, 0, 
0.0 , 0 , 1) 
JavaFX CSS Control Skinning
HTML5 & JavaFX 
WebView Overview 
• Uses WebKit as the rendering engine – same renderer used 
by: 
• Safari 
• Chrome <29 – Google has forked WebKit. 
• Fully functional web browser – can render 
cnn.com/ebay.com/etc. 
• No built-in navigation controls. 
• Proxy detection/configuration challenging. 
• Limited control of page load/monitoring.
HTML5 & JavaFX 
WebView Integration 
Bidirectional communication: 
• JavaScript code can call Java code from WebView. 
• Java code can invoke JavaScript methods.
HTML5 & JavaFX 
WebView Debugging (Secret) 
Response will be JSON.
HTML5 & JavaFX 
Integrating WebView 
• WebView enables hybrid applications. 
• Integrate web applications into desktop application. 
• Integrate message forums/online help. 
• Provide online HTML based help. 
• Limitations: 
• HTML5 geolocation feature doesn’t work. 
• Unable to set user-agent (causes problems with some 
JavaScript/servers.)
HTML5 & JavaFX 
SVG & JavaFX
HTML5 & JavaFX 
Conclusion 
• HTML5: 
• External libraries necessary to make HTML5 viable. 
• Well developed ecosystem. 
• Weakness: core language and feature integration. 
• JavaFX: 
• Well designed architecture with excellent feature integration. 
• Next logical step for the desktop/embedded devices. 
• Weakness: mobile support.
Summary 
References 
• Email contact: 
• rcuprak@gmail.com 
• Twitter: @ctjava 
• Other Session: 
• Hybrid Mobile Development with Apache Cordova and Java EE 7 
(TUT5276) 
• 50 EJB 3 Best Practices in 50 Minutes - CON1947 
• Books:
1 of 100

Recommended

[English version] JavaFX and Web Integration by
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web IntegrationKazuchika Sekiya
3.3K views40 slides
JavaFX 2 Using the Spring Framework by
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkStephen Chin
47.7K views34 slides
DataFX - JavaOne 2013 by
DataFX - JavaOne 2013DataFX - JavaOne 2013
DataFX - JavaOne 2013Hendrik Ebbers
63K views57 slides
JavaFX Enterprise (JavaOne 2014) by
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)Hendrik Ebbers
13.8K views55 slides
Java EE 8: On the Horizon by
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the HorizonJosh Juneau
13.3K views72 slides
Building Java Desktop Apps with JavaFX 8 and Java EE 7 by
Building Java Desktop Apps with JavaFX 8 and Java EE 7Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Bruno Borges
7.3K views21 slides

More Related Content

What's hot

Java EE Revisits GoF Design Patterns by
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsMurat Yener
15.9K views46 slides
Java EE and Spring Side-by-Side by
Java EE and Spring Side-by-SideJava EE and Spring Side-by-Side
Java EE and Spring Side-by-SideReza Rahman
54.8K views32 slides
What's New in WebLogic 12.1.3 and Beyond by
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondOracle
20.3K views16 slides
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008 by
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008Baruch Sadogursky
1.4K views47 slides
The State of Wicket by
The State of WicketThe State of Wicket
The State of WicketMartijn Dashorst
50.4K views112 slides
Wicket Introduction by
Wicket IntroductionWicket Introduction
Wicket IntroductionEyal Golan
3.5K views35 slides

What's hot(20)

Java EE Revisits GoF Design Patterns by Murat Yener
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
Murat Yener15.9K views
Java EE and Spring Side-by-Side by Reza Rahman
Java EE and Spring Side-by-SideJava EE and Spring Side-by-Side
Java EE and Spring Side-by-Side
Reza Rahman54.8K views
What's New in WebLogic 12.1.3 and Beyond by Oracle
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
Oracle20.3K views
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008 by Baruch Sadogursky
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Baruch Sadogursky1.4K views
Wicket Introduction by Eyal Golan
Wicket IntroductionWicket Introduction
Wicket Introduction
Eyal Golan3.5K views
JavaOne 2011: Migrating Spring Applications to Java EE 6 by Bert Ertman
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
Bert Ertman119.7K views
jDays2015 - JavaEE vs. Spring Smackdown by Mert Çalışkan
jDays2015 - JavaEE vs. Spring SmackdownjDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring Smackdown
Mert Çalışkan3K views
Java EE vs Spring Framework by Rohit Kelapure
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
Rohit Kelapure22.3K views
Java APIs- The missing manual (concurrency) by Hendrik Ebbers
Java APIs- The missing manual (concurrency)Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)
Hendrik Ebbers219 views
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0 by David Delabassee
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
David Delabassee1.8K views
Testing Java EE Applications Using Arquillian by Reza Rahman
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using Arquillian
Reza Rahman25.7K views

Viewers also liked

JavaFX and HTML5 - Like Curds and Rice by
JavaFX and HTML5 - Like Curds and RiceJavaFX and HTML5 - Like Curds and Rice
JavaFX and HTML5 - Like Curds and RiceStephen Chin
8.2K views26 slides
Moving to the Client - JavaFX and HTML5 by
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Stephen Chin
9.1K views25 slides
Designing a JavaFX Mobile application by
Designing a JavaFX Mobile applicationDesigning a JavaFX Mobile application
Designing a JavaFX Mobile applicationFabrizio Giudici
2.7K views28 slides
Building RIA Applications with JavaFX by
Building RIA Applications with JavaFXBuilding RIA Applications with JavaFX
Building RIA Applications with JavaFXMax Katz
2.8K views29 slides
JavaFX Advanced by
JavaFX AdvancedJavaFX Advanced
JavaFX AdvancedPaul Bakker
2.3K views45 slides
JavaOne 2013: Organizing Your Local Community by
JavaOne 2013: Organizing Your Local CommunityJavaOne 2013: Organizing Your Local Community
JavaOne 2013: Organizing Your Local CommunityRyan Cuprak
811 views38 slides

Viewers also liked(20)

JavaFX and HTML5 - Like Curds and Rice by Stephen Chin
JavaFX and HTML5 - Like Curds and RiceJavaFX and HTML5 - Like Curds and Rice
JavaFX and HTML5 - Like Curds and Rice
Stephen Chin8.2K views
Moving to the Client - JavaFX and HTML5 by Stephen Chin
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
Stephen Chin9.1K views
Designing a JavaFX Mobile application by Fabrizio Giudici
Designing a JavaFX Mobile applicationDesigning a JavaFX Mobile application
Designing a JavaFX Mobile application
Fabrizio Giudici2.7K views
Building RIA Applications with JavaFX by Max Katz
Building RIA Applications with JavaFXBuilding RIA Applications with JavaFX
Building RIA Applications with JavaFX
Max Katz2.8K views
JavaFX Advanced by Paul Bakker
JavaFX AdvancedJavaFX Advanced
JavaFX Advanced
Paul Bakker2.3K views
JavaOne 2013: Organizing Your Local Community by Ryan Cuprak
JavaOne 2013: Organizing Your Local CommunityJavaOne 2013: Organizing Your Local Community
JavaOne 2013: Organizing Your Local Community
Ryan Cuprak811 views
Java script nirvana in netbeans [con5679] by Ryan Cuprak
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
Ryan Cuprak1.1K views
JavaFX on Mobile (by Johan Vos) by Stephen Chin
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
Stephen Chin3.2K views
Developing in the Cloud by Ryan Cuprak
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
Ryan Cuprak1.1K views
JavaFX Layout Secrets with Amy Fowler by Stephen Chin
JavaFX Layout Secrets with Amy FowlerJavaFX Layout Secrets with Amy Fowler
JavaFX Layout Secrets with Amy Fowler
Stephen Chin24.6K views
Combining R With Java For Data Analysis (Devoxx UK 2015 Session) by Ryan Cuprak
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
Ryan Cuprak3.6K views
Java EE 8 Update by Ryan Cuprak
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
Ryan Cuprak9.6K views
Hybrid Mobile Development with Apache Cordova and by Ryan Cuprak
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak1.9K views
Batching and Java EE (jdk.io) by Ryan Cuprak
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)
Ryan Cuprak2.1K views
Jms deep dive [con4864] by Ryan Cuprak
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
Ryan Cuprak2.2K views
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees) by Stephen Chin
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
Stephen Chin190.7K views
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014) by Ryan Cuprak
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Ryan Cuprak15.8K views
Top 50 java ee 7 best practices [con5669] by Ryan Cuprak
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
Ryan Cuprak9.3K views
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014 by Ryan Cuprak
50 EJB 3 Best Practices in 50 Minutes - JavaOne 201450 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
Ryan Cuprak33K views

Similar to JavaFX Versus HTML5 - JavaOne 2014

JavaOne 2010 Keynote by
JavaOne 2010 Keynote JavaOne 2010 Keynote
JavaOne 2010 Keynote Tomoyuki Tatsuno
431 views35 slides
Java keynote preso by
Java keynote presoJava keynote preso
Java keynote presoArtur Alves
581 views32 slides
Hybrid application development by
Hybrid application developmentHybrid application development
Hybrid application developmentEngin Hatay
2.7K views31 slides
Moving to the Client - JavaFX and HTML5 by
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Stephen Chin
12.9K views28 slides
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach by
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachPROIDEA
124 views48 slides
baidu开发者大会 - Web App开发框架介绍以及分析 by
baidu开发者大会 - Web App开发框架介绍以及分析baidu开发者大会 - Web App开发框架介绍以及分析
baidu开发者大会 - Web App开发框架介绍以及分析joylite
746 views38 slides

Similar to JavaFX Versus HTML5 - JavaOne 2014(20)

Java keynote preso by Artur Alves
Java keynote presoJava keynote preso
Java keynote preso
Artur Alves581 views
Hybrid application development by Engin Hatay
Hybrid application developmentHybrid application development
Hybrid application development
Engin Hatay2.7K views
Moving to the Client - JavaFX and HTML5 by Stephen Chin
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
Stephen Chin12.9K views
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach by PROIDEA
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
PROIDEA124 views
baidu开发者大会 - Web App开发框架介绍以及分析 by joylite
baidu开发者大会 - Web App开发框架介绍以及分析baidu开发者大会 - Web App开发框架介绍以及分析
baidu开发者大会 - Web App开发框架介绍以及分析
joylite746 views
WebNetConf 2012 - Single Page Apps by Pop Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page Apps
Pop Apps1K views
AngularJS - Architecture decisions in a large project  by Elad Hirsch
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
Elad Hirsch3.5K views
SYED_DANISH_J2EE_8YRs by danish ali
SYED_DANISH_J2EE_8YRsSYED_DANISH_J2EE_8YRs
SYED_DANISH_J2EE_8YRs
danish ali143 views
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf by JAX London
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfHTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
JAX London2.2K views
001. Introduction about React by Binh Quan Duc
001. Introduction about React001. Introduction about React
001. Introduction about React
Binh Quan Duc283 views
Building Rich Internet Applications Using Google Web Toolkit by rajivmordani
Building Rich Internet Applications Using  Google Web ToolkitBuilding Rich Internet Applications Using  Google Web Toolkit
Building Rich Internet Applications Using Google Web Toolkit
rajivmordani3.1K views
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal by ITCamp
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp852 views
Curriculum vitae of nguyen hai quy by Hai Quy Nguyen
Curriculum vitae of nguyen hai quyCurriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quy
Hai Quy Nguyen475 views
WaveMaker tutorial with Flash by marina2207
WaveMaker tutorial with FlashWaveMaker tutorial with Flash
WaveMaker tutorial with Flash
marina22071.5K views
WAD - WaveMaker tutorial by marina2207
WAD - WaveMaker tutorial WAD - WaveMaker tutorial
WAD - WaveMaker tutorial
marina22072.4K views

More from Ryan Cuprak

Jakarta EE Test Strategies (2022) by
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Ryan Cuprak
13 views89 slides
DIY Home Weather Station (Devoxx Poland 2023) by
DIY Home Weather Station (Devoxx Poland 2023)DIY Home Weather Station (Devoxx Poland 2023)
DIY Home Weather Station (Devoxx Poland 2023)Ryan Cuprak
99 views83 slides
Why jakarta ee matters (ConFoo 2021) by
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Ryan Cuprak
221 views62 slides
Polygot Java EE on the GraalVM by
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVMRyan Cuprak
1K views49 slides
Exploring Java Heap Dumps (Oracle Code One 2018) by
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
2K views69 slides
Node.js Development with Apache NetBeans by
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeansRyan Cuprak
5.5K views44 slides

More from Ryan Cuprak(12)

Jakarta EE Test Strategies (2022) by Ryan Cuprak
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)
Ryan Cuprak13 views
DIY Home Weather Station (Devoxx Poland 2023) by Ryan Cuprak
DIY Home Weather Station (Devoxx Poland 2023)DIY Home Weather Station (Devoxx Poland 2023)
DIY Home Weather Station (Devoxx Poland 2023)
Ryan Cuprak99 views
Why jakarta ee matters (ConFoo 2021) by Ryan Cuprak
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
Ryan Cuprak221 views
Polygot Java EE on the GraalVM by Ryan Cuprak
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
Ryan Cuprak1K views
Exploring Java Heap Dumps (Oracle Code One 2018) by Ryan Cuprak
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
Ryan Cuprak2K views
Node.js Development with Apache NetBeans by Ryan Cuprak
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
Ryan Cuprak5.5K views
Preparing for java 9 modules upload by Ryan Cuprak
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
Ryan Cuprak1.7K views
Faster Java EE Builds with Gradle by Ryan Cuprak
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
Ryan Cuprak492 views
Faster Java EE Builds with Gradle by Ryan Cuprak
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
Ryan Cuprak1.9K views
Containerless in the Cloud with AWS Lambda by Ryan Cuprak
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
Ryan Cuprak1.4K views
Faster java ee builds with gradle [con4921] by Ryan Cuprak
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
Ryan Cuprak2.4K views

Recently uploaded

Page Object Model by
Page Object ModelPage Object Model
Page Object Modelartembondar5
7 views5 slides
Agile 101 by
Agile 101Agile 101
Agile 101John Valentino
13 views20 slides
Flask-Python by
Flask-PythonFlask-Python
Flask-PythonTriloki Gupta
10 views12 slides
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...Stefan Wolpers
44 views38 slides
Mobile App Development Company by
Mobile App Development CompanyMobile App Development Company
Mobile App Development CompanyRichestsoft
5 views6 slides
Top-5-production-devconMunich-2023.pptx by
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptxTier1 app
10 views40 slides

Recently uploaded(20)

How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by Stefan Wolpers
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
Stefan Wolpers44 views
Mobile App Development Company by Richestsoft
Mobile App Development CompanyMobile App Development Company
Mobile App Development Company
Richestsoft 5 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app10 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert35 views
predicting-m3-devopsconMunich-2023-v2.pptx by Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app14 views
Automated Testing of Microsoft Power BI Reports by RTTS
Automated Testing of Microsoft Power BI ReportsAutomated Testing of Microsoft Power BI Reports
Automated Testing of Microsoft Power BI Reports
RTTS11 views
Electronic AWB - Electronic Air Waybill by Freightoscope
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill
Freightoscope 6 views
Advanced API Mocking Techniques Using Wiremock by Dimpy Adhikary
Advanced API Mocking Techniques Using WiremockAdvanced API Mocking Techniques Using Wiremock
Advanced API Mocking Techniques Using Wiremock
Dimpy Adhikary5 views
Introduction to Git Source Control by John Valentino
Introduction to Git Source ControlIntroduction to Git Source Control
Introduction to Git Source Control
John Valentino8 views
Quality Engineer: A Day in the Life by John Valentino
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the Life
John Valentino10 views
Streamlining Your Business Operations with Enterprise Application Integration... by Flexsin
Streamlining Your Business Operations with Enterprise Application Integration...Streamlining Your Business Operations with Enterprise Application Integration...
Streamlining Your Business Operations with Enterprise Application Integration...
Flexsin 5 views
predicting-m3-devopsconMunich-2023.pptx by Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app10 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic16 views

JavaFX Versus HTML5 - JavaOne 2014

  • 1. JavaFX Versus HTML5 Ryan Cuprak, Dassault Systemès David Grieve, Oracle
  • 2. Agenda • Demo Application • Technical Comparison • JavaFX in Perspective • HTML5 in Perspective • Analysis • Integration • Summary Both designed and engineered using Dassault Systèmes CATIA software! https://github.com/rcuprak/n34sailor
  • 4. Demo Application Why not Swing? • JavaFX replaces Swing • Swing was a 1990s technology – different era • Swing has significant shortcomings: • No support for touch • Hard to customize appearance • JTable feature poor with complex code • No support for animation • No data binding support • No support for animations • Some customization require changes to L&F classes
  • 5. Demo Application Background • HTML5 has arrived on the desktop • HTML5 has arrived on mobile • HTML5 apps are apps! • Logic written in JavaScript • UI HTML5/CSS3 • HTML5 apps are gaining device support: • Compass/GPS/Accelerometers/BlueToo th
  • 6. Demo Application What type of demo application? • Mobile – using HTML5 and Apache Cordova • Apps not websites! • HTML5 enables app development • Excitement is around app development • Rich user experiences • Not talking about JSF + HTML5
  • 7. Demo Application What type of demo application? Not this type of web app!
  • 8. Demo Application Sailboat Racing Start/Finish
  • 9. Demo Application Architecture Interface Application Entities Infrastructure Apache Cordova EJB JPA Entities JPA JavaFX JAX-RS WebSocket JMS CDI
  • 10. Demo Application Sailboat Racing Overview • Committee boat sets the course and announces it via radio. • Boats register via radio specifying their class. • Start sequence for class: • Warning horn is sounded • Start horn is sounded (boats cross start line) • Start sequence repeated for next class. • Committee boat monitors progress and weather. • Race course altered if wind dies or conditions deteriorate. • Finish time for each boat is registered at the end of the race • Final results are calculated.
  • 11. Mobile Overview Native HTML5 Apps • Single Page Application (SPA) wrapped in Native application. • Native application displays a WebView – embedded browser. • Logic: • JavaScript • JavaScript platform extensions • UI • HTML5 markup • SVG • Canvas • WebGL • All assets are bundled with the application.
  • 12. Mobile Overview Native HTML5 vs. Web Apps HTTP Session JSF/JSP/Facelets
  • 14. Demo Application Technologies • JavaFX • Vanilla JavaFX– designed using Scene Builder 2.0 • JAX-RS 2.0 (Jersey) • WebSockets (Tyrus) • Java API for JSON Processing • HTML5 • Apache Cordova (Android/iOS/Windows/Tizen/BlackBe rry) • JQuery • JQuery Mobile • Knockout JS
  • 15. Mobile Overview Framework License jQuery Mobile http://jquerymobile.com MIT Sencha Touch http://sencha.com Commercial(Free) & Open Source (GPLv3) Intel App Framework http://app-framework-software.intel.com MIT Ionic http://ionicframework.com MIT M-Project http://www.the-m-project.org MIT Kendo UI http://www.telerik.com Commercial Twitter Bootstrap 3 http://getbootstrap.com MIT Mobile Frameworks
  • 17. Demo Application Material Differences • JavaFX • No camera integration • No GPS integration • Connectivity information (network availability/type) • HTML5 • UI layout • Background threading • Browser support – IndexDB
  • 19. Technical Comparison High Level Overview • HTML5 • UI constructed using HTML5 markup • Logic implemented using JavaScript • Tooling: NetBeans • JavaFX • UI constructed using FXML • Logic implemented using Java • Tooling: NetBeans, Scene Builder 2
  • 20. Technical Comparison JavaFX: Architecture with Controllers Login Map Weather Navigation Chat MainMen u Race Register Main fxml fxml fxml fxml fxml fxml fxml fxml
  • 21. Technical Comparison JavaFX: Controller Architecture
  • 22. Technical Comparison JavaFX: UI Flow 1. JoinRace.fxml invokes confirmAction(ActionEvent) 2. RaceController sets the data on RaceController.
  • 23. Technical Comparison HTML5: SPA Architecture index.html <html><body> <div id=“page”> <a href=“menu.html”> Menu </a> </div> </body></html> menu.html <html><body> <div id=“page”> <a href=“info.html”> Info </a> </div> </body></html> <a href=“info.html”> Info </a> info.html <html><body> <Info div id=“page”> Info </div> </body></html>
  • 24. Technical Comparison HTML5: Page Flow index.html account.html login.html menu.html joinRace.html register.html results.html welcome.html weather. chat.html info.html tracking.html
  • 25. Technical Comparison HTML5: UI Flow App.js joinRace.html Race.js - getRaces() - pageBeforeJoinRaces() - joinSelectedRace() menu.html - pageBeforeShow() - pageChange() 1. menu.html - <a id="raceMenu" onclick="getRaces();">Join Race</a> 2. app.js – pageChange() 3. app.js – pageBeforeShow() -> Race.js getRaces() 4. joinRace.html - <button type="button" id="Login" onclick="joinSelectedRace();" value="Login">Confirm</button>
  • 26. Technical Comparison HTML5: UI Transitions Changing to another page: • Processing a page before rendering:
  • 27. Technical Comparison HTML5: Apache Cordova + JQuery Mobile Initialization App “states” are different.
  • 28. Technical Comparison HTML5: Loading Data JQuery Mobile – varies by JavaScript library
  • 29. Technical Comparison HTML5: Using Knockout Using Bindings
  • 30. Technical Comparison HTML5: Knockout Complications Converting data to JSON becomes more complicated:
  • 31. Technical Comparison JavaFX: Data Binding Bound using @FXML @FXML void userNameEntered(ActionEvent)
  • 32. Technical Comparison JavaFX: Binding Conditionally enable the login button
  • 36. Technical Comparison HTML5: Busy Indicator – Animation Markup
  • 37. Technical Comparison HTML5: Busy Indicator – Animation with CSS3
  • 38. Technical Comparison HTML5: Tables JQuery plug: Data Tables http://www.datatables.net
  • 42. Technical Comparison Server Communication Client Java EE 7 App Server REST Request/Response Web Sockets Bidirectional Restful Web Service Web Socket Endpoint
  • 43. Technical Comparison Server Communication • JavaFX • Not part of Java 8. • Websocket: Project Tyrus https://tyrus.java.net/index.html • REST: Project Jersey https://jersey.java.net • JSON Processing https://jsonp.java.net • HTML5 • REST – native support: • Xmlhttp – used to issue AJAX calls. • WebSocket – native support: • WebSocket – used to register callbacks and send data.
  • 44. Technical Comparison HTML5: WebSocket Support http://caniuse.com/#search=webso Android Version Date WebSocket Deployed 4.4 JellyBean July 24, 2013 No 26.5% (80% can’t) 4.4 KitKat October 31, 2013 Yes 20% (8/2014)
  • 45. Technical Comparison Java: REST Invocation Java Objects! Java API for JSON JAX-RS Client
  • 46. Technical Comparison HTML5: REST Invocation
  • 47. Technical Comparison HTML5: WebSocket Support
  • 48. Technical Comparison JavaFX: WebSocket Support
  • 49. Technical Comparison HTML5: Layout Challenges
  • 50. Apache Cordova HTML5: Device Access
  • 51. Technical Comparison Challenges HTML5 Development Challenges • Null versus undefined • Different approaches to defining “classes” • Global namespace • IDE coding support • Threading – Web Workers cannot update the DOM • IndexDB support/access • Recovering from fatal errors (application “hung”) JavaFX Development Challenges • Mobile support • Interaction with hardware
  • 53. HTML5 & JavaFX JavaFX Misconceptions • JavaFX is irrelevant with the advent of HTML5. • Java on the desktop is dead. • JavaFX and HTML5 are mutually exclusive. • Java does not have good graphics performance. • JavaFX is only for rich media applications – not desktop apps. • JavaFX is meant for only building games and mobile apps. • You would never use JavaFX in a business application.
  • 54. HTML5 & JavaFX Legacy Technologies • Java3D, JAI, and JMF are dead. • Java3D, JAI, and JMF have no relationship to JavaFX. • JavaFX is not like these technologies: • Cross-platform – features are available everywhere. • Integrated into the JRE – no separate download/versioning/etc. • JavaFX includes support for common video and audio formats.
  • 55. HTML5 & JavaFX • Retained mode • SceneGraph • Scene Builder Tool • 60+ components • CSS skinning • Built-in animation support • Audio/video support • Multi-touch • 3D Tooling Support with SceneBuilder JavaFX Key Features
  • 56. HTML5 & JavaFX JavaFX in Perspective Differentiating feature: Scene graph is at the core of the API. • UI widgets are nodes like any other node! • UI widgets are thus like any other node in the scene graph • Can be animated, transformed, filtered, leverage customized event handling
  • 58. HTML5 & JavaFX HTML5 Major Features • 2D Canvas • WebGL – technically not part of HTML5 • CCS3 – WebFonts, Transformations, CSS Animation • WebSockets • Web Workers – background threading • Data storage – file system access, local storage, app cache
  • 59. HTML5 & JavaFX HTML5 vs. Traditional Web Applications • Not page centric like JSF/JSP/Servlets. • Single Page Application (SPA) – the app is the page. • Client is stateful and not stateless. • Application is coded in JavaScript. • True asynchronous communication with the server. • Application may not have a backend server. • Maybe sold via an App store.
  • 60. HTML5 & JavaFX HTML5 Applied • Many mobile apps are hybrids: • Native application shell with HTML5 content. • PhoneGap aka Apache Cordova • Native application development dominates mobile: • Mobile phones, while powerful, are not as powerful as 2 GHz i3. • Mobiles devices are RAM limited – garbage collection and RAM • Android support native apps (C/C++) – NDK. • Performance/usability issues - FaceBook went native.
  • 62. HTML5 & JavaFX Technical Comparison Agenda • Overview • Feature Support • Rendering APIs • Multimedia • Controls • Animation • 3D Comparison
  • 63. HTML5 & JavaFX Overview: Comparison Challenge • HTML5 is amorphous: • Basic set of base technologies (SVG, Canvas, WebGL, WebSockets, WebWorker). • Additional functionality provided by open source libraries: • JQuery • Three.js • Tween.js • Almost impossible to argue HTML5 can’t do X. • JavaFX is fixed: • More robust core features. • Easier to use developmentally. • Smaller ecosystem of components.
  • 64. HTML5 & JavaFX Overview: HTML5 Limitations • JavaScript language • Browser challenges • Custom browser extensions • Concurrency • Time zone detection • Tooling challenges • Patent infringement/ IP theft.
  • 65. HTML5 & JavaFX Overview: JavaFX Limitations • No smart phone strategy. • RoboVM– opens up iOS! http://www.robovm.org • Incomplete – still a work in progress. • Core features dependent upon Oracle resourcing. • Missing features: • geo-location, device orientation, accelerometers, camera capture • Perception – JavaFX 1.0.
  • 66. HTML5 & JavaFX JavaFX HTML5 Deployment Strategies Mac App Store ✔ ✔ Microsoft App Store ✔ ✔ Android Stores ✖ ✔ iTunes  ✔ Browser  ✔
  • 67. HTML5 & JavaFX HTML5 Feature Support Feature IE Chrome FireFox Safari Canvas IE 9 26 21 5.1 WebGL ✖ 26   Web 10 26 21 6.0 Sockets SVG 9 26 21 5.1 Offline 10 26 21 5.1 Apps Animation 10 26 21 6.0
  • 68. HTML5 & JavaFX Rendering • HTML5 Canvas element is a 2D draw surface – similar to Java 2D, MacOS X Quartz, QuickDraw, etc. • HTML5 Canvas is immediate – JavaFX retained. • HTML5 Canvas similar to JavaFX Canvas. • HTML5 Canvas does not support hit detection.
  • 69. HTML5 & JavaFX Rendering JavaFX HTML5 javafx.scene.Scene javafx.scene.canvas.Canvas SVG Canvas
  • 70. HTML5 & JavaFX 2D Canvas: JavaFX vs. HTML5 • Similarities: • Immediate mode rendering. • API almost exact match. • JavaFX: • Canvas can participate in scene graph and also JavaFX 3D. • Supports SVG paths. • HTML5: • Lacks fill support for arcs or polygons.
  • 71. HTML5 & JavaFX Feature Integration JavaFX HTML5 Scene Canvas Video Audio Canvas SVG Video CSS Audio Feature Layout not integrated. 3D WebGL (3D)
  • 72. HTML5 & JavaFX Feature Integration Video and Canvas integrated via layout.
  • 73. HTML5 & JavaFX SVG • SVG – 2D vector image support (.svg) • XML based: supports vector, raster, and text. • SVG 1.0 release in 2001. • SVG 2.0 targeted for 8/2014. • Can be compressed using gzip. • Browser support is not robust • IE8 didn’t provide SVG support • Modules lacking full support: Font, Filter, Clip, Cursor • Include in HTML using <embed>, <object>, or <iframe>
  • 74. HTML5 & JavaFX HTML5: SVG • Multiple tools can export to SVG: • Adobe Illustrator • OmniGraffle Professional • CorelDraw • InkScape (open source) • SVG format has a similar structure. • Can be manipulated from JavaScript.
  • 75. HTML5 & JavaFX Controls • HTML5 and JavaFX have rich suite of controls. • Binding: • JavaFX – built-in • HTML5 – need library like knockout.js. • HTML5 lacks a windowing API. • No layout managers, windows, menu bars, etc. • No framework for extending browser controls. • Controls vary between browsers. • No support for internationalization. • JavaFX controls are node in the scene graph.
  • 76. HTML5 & JavaFX Tables • HTML5 • No native “grid” data grid component (JTable/Excel equivalent) • You cannot drag and drop <tr></tr> to rearrange a table. • Challenges: Merging cells (row/column), copy paste, selection. • JavaFX • Powerful table component – joining cells, selection, copy paste, drag and drop. • Supports table joining in JavaFX 8.
  • 77. HTML5 & JavaFX Multimedia Support • Video/audio codec support determined by patents. • Oracle licenses formats for JavaFX. • HTML5 supports no audio/video codecs by default. • JavaFX provides a known set of codecs. • Built on top of Gstreamer (http://www.gstreamer.com)
  • 78. HTML5 & JavaFX Video Codecs Support Matrix JavaFX HTML5 Chrome FireFox Safari IE FLV (VP6 video/mp3 audio) ✔ ✔ ✔ ✖ ✖ H.264 ✔ ✔ ✔ ✔ ✔ Theora ✖ ✔ ✔ ✖ ✖ VP8 (WebM) ✖ ✔ ✔ ✖ ✖ VP9 (WebM) ✖ ✔ ✖ ✖ ✖
  • 79. HTML5 & JavaFX Video Codec Support • HTML5 video includes controller play/stop/progress/seek/volume. • HTML5 – easy to fallback to plugins (Flash) where necessary. • JavaFX – does not include controller UI. • Neither technology can access individual video Frames!
  • 80. JavaFX & HTML5 Audio Codecs Support Matrix JavaFX HTML5 Chrome FireFox Safari IE ACC ✔ ✔  ✔ ✔ AIFF ✔ ✖ ✖ ✖ ✖ Ogg Opus ✖ ✔ ✔ ✖ ✖ Ogg Vorbis ✖ ✔ ✔ ✔ ✖ MP3 ✔ ✔  ✔ ✔ WAV PCM ✔ ✔ ✔ ✔ ✖ WebM ✖ ✖ ✔ ✖ ✖
  • 81. HTML5 & JavaFX Animation • HTML5 animation is primitive. • requestNextAnimationFrame callback • You are responsible for everything else! • Callback not supported on all platforms - polyfill can suffer performance degradations • Must either build a toolkit or use JavaScript animation library like tween.js. • JavaFX • Animation framework built into the platform • All nodes can be animated – include UI elements. • javafx.animation.Animation – base class – two subclasses.
  • 82. HTML5 & JavaFX JavaFX Animation Support • Robust built-in library for animation. • Leverages JavaFX binding capabilities • JavaFX Animation subclasses: • Parallel/Sequential • Timeline/Keyframes • Transition: FadeTransition, FillTransition, ParallelTransition, PathTransition, PauseTransition, RotateTransition, ScaleTransition, SequentialTransition, StrokeTransition, TranslateTransition
  • 83. HTML5 & JavaFX HTML5 Animation Support
  • 84. HTML5 & JavaFX 3D Support • JavaFX 8 and HTML5 WebGL both support 3D. • JavaFX 8 3D support: • Built on top of OpenGL/Direct 3D • Provides a built-in scene graph • Decora – DSL Shader language • HTML5 JavaFX WebView does not support WebGL. • JavaFX 3D – 3D without the overhead.
  • 85. HTML5 & JavaFX WebGL • WebGL developed by Khronos Group • Based on OpenGL ES 2.0 – embedded OpenGL API used on iOS and Android. • API is low level – must develop or use framework on top of WebGL. • GLGE: http://www.glge.org • SceneJS: http://www.scenejs.org • CubicVR: http://www.cubicvr.org • Three.js: http://www.threejs.org • Not supported in all browsers. • IE support has been lacking – first version IE 11. • Safari requires the user enable WebGL (Developer menu). • Shaders written in C-like language
  • 86. HTML5 & JavaFX three.js vs. JavaFX 3D Feature JavaFX WebGL three.js Light 7 2 Built-in Shapes 25 4 WebGL – no JavaScript libaries Only triangle meshes No picking API, lines, etc. (currently) JavaFX Highlevel API – use jogl for OpenGL capabilities.
  • 87. HTML5 & JavaFX Performance Tuning • JVM can be tuned for performance. • HTML5 lacks tuning support. • Cannot configure garbage collection. • Each browser is “different.” • Limited tooling for exploring JavaScript VM problems. http://www.html5rocks.com/en/tutorials/speed/static-mem-pools
  • 89. HTML5 & JavaFX Integrating JavaFX & HTML5 • CSS for skinning components. • WebView for rendering HTML5 content. • SVG rendering support.
  • 90. HTML5 & JavaFX JavaFX CSS Control Skinning • JavaFX uses CSS for skinning. • JavaFX uses its own CSS attributes. • JavaFX CSS reader is not fully compliant. • Graphic artist will must learn JavaFX CSS properties. • JavaFX skinning properties don’t support animation.
  • 91. HTML5 & JavaFX JavaFX CSS Control Skinning JavaFX HTML5
  • 92. HTML5 & JavaFX JavaFX CSS Control Skinning
  • 93. HTML5 & JavaFX HTML5 Property HTML5 Value JavaFX Property JavaFX Value background -webkit-gradient( linear, left top, left bottom, from(#3e779d), to(#65a9d7)) -fx-background-color linear-gradient(to bottom, rgb(62,119,157), rgb(101,169,215)) border-radius 8px -fx-border-radius 8px box-shadow rgba(0,0,0,1) 0 1px 0 -fx-effect dropshadow(one-pass- box,black, 0, 0.0 , 0 , 1) JavaFX CSS Control Skinning
  • 94. HTML5 & JavaFX WebView Overview • Uses WebKit as the rendering engine – same renderer used by: • Safari • Chrome <29 – Google has forked WebKit. • Fully functional web browser – can render cnn.com/ebay.com/etc. • No built-in navigation controls. • Proxy detection/configuration challenging. • Limited control of page load/monitoring.
  • 95. HTML5 & JavaFX WebView Integration Bidirectional communication: • JavaScript code can call Java code from WebView. • Java code can invoke JavaScript methods.
  • 96. HTML5 & JavaFX WebView Debugging (Secret) Response will be JSON.
  • 97. HTML5 & JavaFX Integrating WebView • WebView enables hybrid applications. • Integrate web applications into desktop application. • Integrate message forums/online help. • Provide online HTML based help. • Limitations: • HTML5 geolocation feature doesn’t work. • Unable to set user-agent (causes problems with some JavaScript/servers.)
  • 98. HTML5 & JavaFX SVG & JavaFX
  • 99. HTML5 & JavaFX Conclusion • HTML5: • External libraries necessary to make HTML5 viable. • Well developed ecosystem. • Weakness: core language and feature integration. • JavaFX: • Well designed architecture with excellent feature integration. • Next logical step for the desktop/embedded devices. • Weakness: mobile support.
  • 100. Summary References • Email contact: • rcuprak@gmail.com • Twitter: @ctjava • Other Session: • Hybrid Mobile Development with Apache Cordova and Java EE 7 (TUT5276) • 50 EJB 3 Best Practices in 50 Minutes - CON1947 • Books:

Editor's Notes

  1. [Michael] Native HTML5 applications are fundamentally different from mobile web applications. An HTML5 application is a “Single Page Application” – this means that the application resides in a single “page.” There is no: Back button URL bar History Shortcuts The user cannot escape from your application. You code the logic of the application in JavaScript -
  2. You mobile framework to get going. Don’t re-invent the wheel. Desktop web development skills are different than mobile web development skills Have to handle touch, small devices, device orientation changes. Angular can be used although it isn’t listed.
  3. Usage of HTML5 is different.
  4. JavaFX: AIFF (containing uncompressed PCM) WAV (containing uncompressed PCM) MPEG-4 (containing ACC audio)