SlideShare a Scribd company logo
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Migrating from Applets to
Java Desktop Applications
Evolve your Applet-dependent website to a better and safer
distribution model with JavaFX Hybrid Desktop Applications
Bruno Borges
Principal Product Manager
Oracle Corp.
May, 2015
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Why are you still using Applets? A brief history check
The Future of Applets is tied to Browsers
Seamless Migrate from Applet/Browser to Java Desktop App
Hybrid JavaFX Desktop Applications
Distribution Models for Java Desktop App
1
2
3
4
5
4
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Why are you still using Applets?
A brief history check
5
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Applets used to do what browsers couldn’t
6
And provided easy distribution model for fully capable desktop applications
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Applets and Browsers these days
• HTML5, CSS3, Javascript… Browsers are well capable for most use cases
– 3D, Local storage, Canvas, Audio processing, etc
• Applets still exist for some reason
– Distribution model still interesting
• Install Java, hit a URL on the browser and you are ready to go
– Security requirements
– Communication with hardware devices in a “transparent” way
– Proprietary network protocols
– Advanced and specialized file transfer
– Local cryptography, desktop sharing, audio/video streaming, etc
7
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 8
Most banks in Brazil require 3-step verification
Example: Internet Banking Authentication Model
Segurança
Internet
Banking
Internet
Banking
Creden
tials
• User/Pass
• Bank Account ID
• SSN
Hard
ware
Token
• Hardware Auth Token
• Token Card
• SMS Token
Device
• Access Origin Check
• Singularity
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Why are you still using Applets? A brief history check.
The Future of Applets is tied to Browsers
Seamless Migrate from Applet/Browser to Java Desktop App
Hybrid JavaFX Desktop Applications
Distribution Models for Java Desktop App
1
2
3
4
5
9
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
The Future of Applets depend on Browsers
Browsers can, and already have showed signs to drop support on Applets
10
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Advantage
– Semi-transparent execution model
• Disadvantage
– Java “gratis” at java.com
• Highly Dependent
– Web Browsers
– Java Browser Plugin
– Operational Systems
• “Necessary Evil”
– Automatic Updates on Windows
11
Applets on Browsers – Current Access/Distribution Model
Web Browser
Your website
Java
Applets
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Applets on Browsers – 99.99% of cases
• Google Chrome
– NPAPI to be dropped in 2015
– As consequence, will drop support to execute Java Applets
• Mozilla Firefox
– Initially considered to drop support, but after community backfire decided to
continue supporting it, but disabled by default aka “Plugin Activation”
– User must manually allow execution through Firefox’s own security dialog
– Java will also ask depending the case, for execution permission
• In the end, it is up to browsers to allow/support execution of Applets
12
The usual and most common runtime environment for Applets
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Why are you still using Applets? A brief history check.
The Future of Applets is tied to Browsers
Seamless Migrate from Applet/Browser to Java Desktop App
Hybrid JavaFX Desktop Applications
Distribution Models for Java Desktop App
1
2
3
4
5
13
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Seamless Migrate from Applet/Browser
to Java Desktop App
You don’t want nor have to rewrite your solution! Reuse what you already have.
14
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 15
You may be already doing this, known as Hybrid Mobile Applications
From a Browser+Applet web application, to a Desktop
application with wrapped embedded website
+
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 16
You don’t have to shutdown your website+applet access model right away!
Keep Your Web Application. Distribute a New Access Model
Web Browser
Your website
Applets
Java Desktop Application
Embedded Browser
with your website
Libraries
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Browser and Applets, Desktop App and Libraries
• Web applications that depend on invisible Applets
– Javascript can be smart enough to communicate with Java if running on Embedded
Browser inside a Java Desktop application, while also working with legacy applets if
running on a browser
– Java code injects Java objects of legacy Applets features in the DOM tree of
embedded Java browser
• Web applications with visible Applets (AWT/Swing)
– These should be features from outside the embedded browser
• Example: file transfer feature as a popup (similar to Swing’s JDialog) from the Java desktop
application, while still being able to communicate with the page in embedded browser
17
Combining two access models while reusing code
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Why are you still using Applets? A brief history check.
The Future of Applets is tied to Browsers
Seamless Migrate from Applet/Browser to Java Desktop App
Hybrid JavaFX Desktop Applications
Distribution Models for Java Desktop App
1
2
3
4
5
18
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Hybrid JavaFX Desktop Applications
JavaFX Introduction and Resources
19
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 20
Hybrid JavaFX Desktop Application – Architecture
Windows Mac OS XLinux
Oracle JRE
JavaFX
Application
Embedded
Browser
Native UI
Controls
Native
Hardware
Access
HTML5, CSS3,
JavaScript part of
your application
(remote or local)
Native JavaFX or
Embedded Legacy
Swing Controls
Reuse your Java
libraries for hardware
integration (ie:
functionality from
legacy Applets)
Bundle the JRE with your
application for native
installers
One unified
desktop
application
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Advantage
– Controlled “web” environment
– Reuse your existing web application
– Reuse your existing Java libraries or UI
controls (JApplets)
• Highly Independent
– Java “gratis” or Oracle support contract
– Controlled Java updates
– Independent of 3rd-party browsers
(Firefox, Chrome, Safari, IE, etc)
21
New Access Model for your Web Application
Java Desktop Application
Embedded Browser
with your website
Legacy Applets and/or
New Rich Features, as
Libraries
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
JavaFX
• Java SE 8
– Bundled with new Javascript Engine: Nashorn
– Follows ECMAScript 262 v5.1
• JavaFX 8
– Supports embedded Java Swing components (migrate visual JApplets)
– WebView
• Support for HTML5 tags, CSS3, Javascript, and DOM tree
– WebEngine supports bi-directional calls between Java APIs and Javascript in
webpages loaded inside WebView
22
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
JavaFX 8 – Web Engine
• html5test.com
• acid3.acidtests.org
• webkit sunspider 0.9.1 test
23
Standards compatibility and performance analysis
Firefox 29: 244.8ms
Chrome 34: 259.8ms
JavaFX 8: 252.4ms
http://www.websocket.org/echo.html
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Why are you still using Applets? A brief history check.
The Future of Applets is tied to Browsers
Seamless Migrate from Applet/Browser to Java Desktop App
Hybrid JavaFX Desktop Applications
Distribution Models for Java Desktop App
1
2
3
4
5
24
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Distribution Models for Java Desktop Apps
How to distribute your application to your users
25
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Before distributing, you must package it
• Tool name: javapackager (pka javafxpackager)
– Support on NetBeans out of the box
– Also as Apache Ant task
• Supported Installers
– Windows: EXE/MSI
– Mac OS X: DMG
– Linux: RPM/DEB
– Others: installer/image
26
Java tool to package your app and JRE on native installers
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Options of distribution models
• Applet and web application, on a browser
– This is where you are today
• Java Web Start
– Java Desktop application loaded off of browser. Security checks are kept
• Standalone: download links of native installers or the JAR file
– Native installers: user double click and install as desktop standalone application
– JAR file: user must have Java previously installed
• Appstores for General Purpose Desktops/Laptops
– Users are comfortable with this model, since it’s how they install apps on mobile
27
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Java Web Start
• Application files (JARs), like Applets, are hosted on website server
– User clicks on a link to load the application via JWS
– When remote JAR files are updated, JWS automatically updates on user’s computer
• With a Hybrid JavaFX Desktop application in place, this is the easiest model
to move forward before a full replacement, off of browsers
– Users will perceive as a “new window”
• Disadvantages
– Java must be installed prior to execution
– Developer must still keep up-to-date on new security Java updates, due to automatic
Java updates in some operational systems
28
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Download Link
• Provide users with a “Download” section on the website
– JAR download for reduced package size
• User must have Java installed
– Native installers per operational system
• JRE and application bundled into native installers for Windows/Mac/Linux
29
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Appstores for General Purpose Desktops/Laptops
• Publish the native installers (JRE+application bundled) on 3rd-party
appstores for PCs
– Decide which version of Java JRE is bundled. Won’t conflict with any other JRE
installed, or bundled with another application
– Keep control of when to upgrade the version of JRE bundled with the application
30
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 31
Comparison based on external users accessing the application from their own PCs
Differences between Distribution Models for the
Application Developer
Applet Web Start Download Appstore
Unnecessary to Have Java Previously Installed NO NO YES YES
Independent of Java Browser Plugin NO YES YES YES
Unaffected by Java “gratis” Auto Updates NO NO YES (1) YES
Unaffected by Java LiveConnect™ Constraints NO YES YES YES
Unaffected by Browsers Restrictions NO YES YES YES
Application Auto Update for Users OOTB YES YES NO YES
Has Control of Which Java Version Update NO NO YES YES
Has Control of Runtime Environment NO NO YES YES
(1) NO if user downloaded JAR file only, without bundled JRE
Migrating From Applets to Java Desktop Apps in JavaFX

More Related Content

What's hot (20)

PPT
Websphere on z/OS and RACF security
Michael Erichsen
 
PDF
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
Sandesh Rao
 
PPT
Less08 users
Amit Bhalla
 
PDF
Oracle db performance tuning
Simon Huang
 
PDF
Project presentation on Phone Book
Sp Gurjar
 
PPTX
Maquinas virtuales (1)
Johanna Patricia Montaño Guamán
 
PPT
Oracle backup and recovery
Yogiji Creations
 
PDF
Oracle RAC 19c - the Basis for the Autonomous Database
Markus Michalewicz
 
PDF
Overview of Database and Database Management
Mayuree Srikulwong
 
PPTX
Web app presentation
zahid6
 
PPTX
Operating system
Amit Garg
 
PDF
Ash architecture and advanced usage rmoug2014
John Beresniewicz
 
PDF
Linux basic commands with examples
abclearnn
 
POTX
database
Shwetanshu Gupta
 
PPTX
Introduction to Network and System Administration
Duressa Teshome
 
PPTX
Multiuser chat application using java
asifnoman240
 
PDF
Oracle Database Availability & Scalability Across Versions & Editions
Markus Michalewicz
 
PDF
HA, Scalability, DR & MAA in Oracle Database 21c - Overview
Markus Michalewicz
 
PPTX
Why oracle data guard new features in oracle 18c, 19c
Satishbabu Gunukula
 
PDF
Nové vlastnosti Oracle Database Appliance
MarketingArrowECS_CZ
 
Websphere on z/OS and RACF security
Michael Erichsen
 
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
Sandesh Rao
 
Less08 users
Amit Bhalla
 
Oracle db performance tuning
Simon Huang
 
Project presentation on Phone Book
Sp Gurjar
 
Maquinas virtuales (1)
Johanna Patricia Montaño Guamán
 
Oracle backup and recovery
Yogiji Creations
 
Oracle RAC 19c - the Basis for the Autonomous Database
Markus Michalewicz
 
Overview of Database and Database Management
Mayuree Srikulwong
 
Web app presentation
zahid6
 
Operating system
Amit Garg
 
Ash architecture and advanced usage rmoug2014
John Beresniewicz
 
Linux basic commands with examples
abclearnn
 
Introduction to Network and System Administration
Duressa Teshome
 
Multiuser chat application using java
asifnoman240
 
Oracle Database Availability & Scalability Across Versions & Editions
Markus Michalewicz
 
HA, Scalability, DR & MAA in Oracle Database 21c - Overview
Markus Michalewicz
 
Why oracle data guard new features in oracle 18c, 19c
Satishbabu Gunukula
 
Nové vlastnosti Oracle Database Appliance
MarketingArrowECS_CZ
 

Viewers also liked (20)

KEY
Embedding Web UIs in your Eclipse application
Boris Bokowski
 
DOCX
Laporan rajut zhie
Operator Warnet Vast Raha
 
PPTX
Tecnologias Oracle em Docker Containers On-premise e na Nuvem
Bruno Borges
 
PPTX
Melhore o Desenvolvimento do Time com DevOps na Nuvem
Bruno Borges
 
PPTX
Java EE Arquillian Testing with Docker & The Cloud
Bruno Borges
 
PPTX
JavaFX Versus HTML5 - JavaOne 2014
Ryan Cuprak
 
PDF
Oracle RAC on Extended Distance Clusters - Customer Examples
Markus Michalewicz
 
PDF
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Bruno Borges
 
PDF
Oracle Flex ASM - What’s New and Best Practices by Jim Williams
Markus Michalewicz
 
PPTX
SORACOMでのJava/AWS活用
Akio Katayama
 
PDF
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Markus Michalewicz
 
PDF
Oracle Database In-Memory Meets Oracle RAC
Markus Michalewicz
 
PPTX
Foot care for people with diabetes mellitus
Custom Orthotic Design Group Ltd.
 
PDF
Oracle RAC 12c (12.1.0.2) Operational Best Practices - A result of true colla...
Markus Michalewicz
 
PDF
Corn mill machine gets good response
Penny Cao
 
PDF
1.3.1 Решения для монолитного строительства
Igor Golovin
 
PPTX
Intervento apogea marzo 2017
Davide Zucchetti
 
PPTX
Tutorial wix
jenniz
 
Embedding Web UIs in your Eclipse application
Boris Bokowski
 
Laporan rajut zhie
Operator Warnet Vast Raha
 
Tecnologias Oracle em Docker Containers On-premise e na Nuvem
Bruno Borges
 
Melhore o Desenvolvimento do Time com DevOps na Nuvem
Bruno Borges
 
Java EE Arquillian Testing with Docker & The Cloud
Bruno Borges
 
JavaFX Versus HTML5 - JavaOne 2014
Ryan Cuprak
 
Oracle RAC on Extended Distance Clusters - Customer Examples
Markus Michalewicz
 
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Bruno Borges
 
Oracle Flex ASM - What’s New and Best Practices by Jim Williams
Markus Michalewicz
 
SORACOMでのJava/AWS活用
Akio Katayama
 
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Markus Michalewicz
 
Oracle Database In-Memory Meets Oracle RAC
Markus Michalewicz
 
Foot care for people with diabetes mellitus
Custom Orthotic Design Group Ltd.
 
Oracle RAC 12c (12.1.0.2) Operational Best Practices - A result of true colla...
Markus Michalewicz
 
Corn mill machine gets good response
Penny Cao
 
1.3.1 Решения для монолитного строительства
Igor Golovin
 
Intervento apogea marzo 2017
Davide Zucchetti
 
Tutorial wix
jenniz
 
Ad

Similar to Migrating From Applets to Java Desktop Apps in JavaFX (20)

PPTX
Lightweight Java in the Cloud
Bruno Borges
 
PPTX
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
Joelith
 
PDF
Coding for desktop and mobile with HTML5 and Java EE 7 - Geertjan Wielenga
JAXLondon_Conference
 
PDF
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Bruno Borges
 
PDF
WebSockets in Enterprise Applications
Pavel Bucek
 
PDF
Oracle Cloud: Anything as a Service
Bruno Borges
 
PDF
JavaCro'15 - Managing Java at Scale Security and Compatibility Applications -...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
10 Building Blocks for Enterprise JavaScript
Geertjan Wielenga
 
PPTX
Java 101
javafxpert
 
PPTX
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Chris Muir
 
PDF
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Marco Antonio Maciel
 
PDF
Slovenian Oracle User Group
Geertjan Wielenga
 
PDF
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Oracle JET, with JET Mobile Content
Geertjan Wielenga
 
PDF
Imworld.ro
Geertjan Wielenga
 
PDF
JDK 8 and JDK 8 Updates in OpenJDK
Wolfgang Weigend
 
PPTX
The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...
jeckels
 
PPTX
Mastering DevOps with Oracle
jeckels
 
PDF
Session at Oredev 2016.
Geertjan Wielenga
 
Lightweight Java in the Cloud
Bruno Borges
 
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
Joelith
 
Coding for desktop and mobile with HTML5 and Java EE 7 - Geertjan Wielenga
JAXLondon_Conference
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Bruno Borges
 
WebSockets in Enterprise Applications
Pavel Bucek
 
Oracle Cloud: Anything as a Service
Bruno Borges
 
JavaCro'15 - Managing Java at Scale Security and Compatibility Applications -...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
10 Building Blocks for Enterprise JavaScript
Geertjan Wielenga
 
Java 101
javafxpert
 
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Chris Muir
 
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Marco Antonio Maciel
 
Slovenian Oracle User Group
Geertjan Wielenga
 
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Oracle JET, with JET Mobile Content
Geertjan Wielenga
 
Imworld.ro
Geertjan Wielenga
 
JDK 8 and JDK 8 Updates in OpenJDK
Wolfgang Weigend
 
The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...
jeckels
 
Mastering DevOps with Oracle
jeckels
 
Session at Oredev 2016.
Geertjan Wielenga
 
Ad

More from Bruno Borges (20)

PDF
Secrets of Performance Tuning Java on Kubernetes
Bruno Borges
 
PDF
[Outdated] Secrets of Performance Tuning Java on Kubernetes
Bruno Borges
 
PDF
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
Bruno Borges
 
PDF
Making Sense of Serverless Computing
Bruno Borges
 
PPTX
Visual Studio Code for Java and Spring Developers
Bruno Borges
 
PDF
Taking Spring Apps for a Spin on Microsoft Azure Cloud
Bruno Borges
 
PDF
A Look Back at Enterprise Integration Patterns and Their Use into Today's Ser...
Bruno Borges
 
PDF
Servidores de Aplicação: Por quê ainda precisamos deles?
Bruno Borges
 
PDF
Build and Monitor Cloud PaaS with JVM’s Nashorn JavaScripts [CON1859]
Bruno Borges
 
PDF
Cloud Services for Developers: What’s Inside Oracle Cloud for You? [CON1861]
Bruno Borges
 
PDF
Booting Up Spring Apps on Lightweight Cloud Services [CON10258]
Bruno Borges
 
PDF
Java EE Application Servers: Containerized or Multitenant? Both! [CON7506]
Bruno Borges
 
PDF
Running Oracle WebLogic on Docker Containers [BOF7537]
Bruno Borges
 
PDF
Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX
Bruno Borges
 
PDF
Integrando Oracle BPM com Java EE e WebSockets
Bruno Borges
 
PPTX
The Developers Conference 2014 - Oracle Keynote
Bruno Borges
 
PDF
Crie Aplicações Mobile Híbridas Escritas em Java, para iOS e Android
Bruno Borges
 
PDF
Servidores de Aplicação: por que ainda precisamos deles?
Bruno Borges
 
PDF
WebSockets - Realtime em Mundo Conectado
Bruno Borges
 
PDF
Migrando de Applets para JavaFX, e Modelos de Distribuição de Apps
Bruno Borges
 
Secrets of Performance Tuning Java on Kubernetes
Bruno Borges
 
[Outdated] Secrets of Performance Tuning Java on Kubernetes
Bruno Borges
 
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
Bruno Borges
 
Making Sense of Serverless Computing
Bruno Borges
 
Visual Studio Code for Java and Spring Developers
Bruno Borges
 
Taking Spring Apps for a Spin on Microsoft Azure Cloud
Bruno Borges
 
A Look Back at Enterprise Integration Patterns and Their Use into Today's Ser...
Bruno Borges
 
Servidores de Aplicação: Por quê ainda precisamos deles?
Bruno Borges
 
Build and Monitor Cloud PaaS with JVM’s Nashorn JavaScripts [CON1859]
Bruno Borges
 
Cloud Services for Developers: What’s Inside Oracle Cloud for You? [CON1861]
Bruno Borges
 
Booting Up Spring Apps on Lightweight Cloud Services [CON10258]
Bruno Borges
 
Java EE Application Servers: Containerized or Multitenant? Both! [CON7506]
Bruno Borges
 
Running Oracle WebLogic on Docker Containers [BOF7537]
Bruno Borges
 
Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX
Bruno Borges
 
Integrando Oracle BPM com Java EE e WebSockets
Bruno Borges
 
The Developers Conference 2014 - Oracle Keynote
Bruno Borges
 
Crie Aplicações Mobile Híbridas Escritas em Java, para iOS e Android
Bruno Borges
 
Servidores de Aplicação: por que ainda precisamos deles?
Bruno Borges
 
WebSockets - Realtime em Mundo Conectado
Bruno Borges
 
Migrando de Applets para JavaFX, e Modelos de Distribuição de Apps
Bruno Borges
 

Recently uploaded (20)

PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 

Migrating From Applets to Java Desktop Apps in JavaFX

  • 1. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Migrating from Applets to Java Desktop Applications Evolve your Applet-dependent website to a better and safer distribution model with JavaFX Hybrid Desktop Applications Bruno Borges Principal Product Manager Oracle Corp. May, 2015
  • 2. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3
  • 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda Why are you still using Applets? A brief history check The Future of Applets is tied to Browsers Seamless Migrate from Applet/Browser to Java Desktop App Hybrid JavaFX Desktop Applications Distribution Models for Java Desktop App 1 2 3 4 5 4
  • 4. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Why are you still using Applets? A brief history check 5
  • 5. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Applets used to do what browsers couldn’t 6 And provided easy distribution model for fully capable desktop applications
  • 6. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Applets and Browsers these days • HTML5, CSS3, Javascript… Browsers are well capable for most use cases – 3D, Local storage, Canvas, Audio processing, etc • Applets still exist for some reason – Distribution model still interesting • Install Java, hit a URL on the browser and you are ready to go – Security requirements – Communication with hardware devices in a “transparent” way – Proprietary network protocols – Advanced and specialized file transfer – Local cryptography, desktop sharing, audio/video streaming, etc 7
  • 7. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 8 Most banks in Brazil require 3-step verification Example: Internet Banking Authentication Model Segurança Internet Banking Internet Banking Creden tials • User/Pass • Bank Account ID • SSN Hard ware Token • Hardware Auth Token • Token Card • SMS Token Device • Access Origin Check • Singularity
  • 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda Why are you still using Applets? A brief history check. The Future of Applets is tied to Browsers Seamless Migrate from Applet/Browser to Java Desktop App Hybrid JavaFX Desktop Applications Distribution Models for Java Desktop App 1 2 3 4 5 9
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | The Future of Applets depend on Browsers Browsers can, and already have showed signs to drop support on Applets 10
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • Advantage – Semi-transparent execution model • Disadvantage – Java “gratis” at java.com • Highly Dependent – Web Browsers – Java Browser Plugin – Operational Systems • “Necessary Evil” – Automatic Updates on Windows 11 Applets on Browsers – Current Access/Distribution Model Web Browser Your website Java Applets
  • 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Applets on Browsers – 99.99% of cases • Google Chrome – NPAPI to be dropped in 2015 – As consequence, will drop support to execute Java Applets • Mozilla Firefox – Initially considered to drop support, but after community backfire decided to continue supporting it, but disabled by default aka “Plugin Activation” – User must manually allow execution through Firefox’s own security dialog – Java will also ask depending the case, for execution permission • In the end, it is up to browsers to allow/support execution of Applets 12 The usual and most common runtime environment for Applets
  • 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda Why are you still using Applets? A brief history check. The Future of Applets is tied to Browsers Seamless Migrate from Applet/Browser to Java Desktop App Hybrid JavaFX Desktop Applications Distribution Models for Java Desktop App 1 2 3 4 5 13
  • 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Seamless Migrate from Applet/Browser to Java Desktop App You don’t want nor have to rewrite your solution! Reuse what you already have. 14
  • 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 15 You may be already doing this, known as Hybrid Mobile Applications From a Browser+Applet web application, to a Desktop application with wrapped embedded website +
  • 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 16 You don’t have to shutdown your website+applet access model right away! Keep Your Web Application. Distribute a New Access Model Web Browser Your website Applets Java Desktop Application Embedded Browser with your website Libraries
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Browser and Applets, Desktop App and Libraries • Web applications that depend on invisible Applets – Javascript can be smart enough to communicate with Java if running on Embedded Browser inside a Java Desktop application, while also working with legacy applets if running on a browser – Java code injects Java objects of legacy Applets features in the DOM tree of embedded Java browser • Web applications with visible Applets (AWT/Swing) – These should be features from outside the embedded browser • Example: file transfer feature as a popup (similar to Swing’s JDialog) from the Java desktop application, while still being able to communicate with the page in embedded browser 17 Combining two access models while reusing code
  • 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda Why are you still using Applets? A brief history check. The Future of Applets is tied to Browsers Seamless Migrate from Applet/Browser to Java Desktop App Hybrid JavaFX Desktop Applications Distribution Models for Java Desktop App 1 2 3 4 5 18
  • 18. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Hybrid JavaFX Desktop Applications JavaFX Introduction and Resources 19
  • 19. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 20 Hybrid JavaFX Desktop Application – Architecture Windows Mac OS XLinux Oracle JRE JavaFX Application Embedded Browser Native UI Controls Native Hardware Access HTML5, CSS3, JavaScript part of your application (remote or local) Native JavaFX or Embedded Legacy Swing Controls Reuse your Java libraries for hardware integration (ie: functionality from legacy Applets) Bundle the JRE with your application for native installers One unified desktop application
  • 20. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • Advantage – Controlled “web” environment – Reuse your existing web application – Reuse your existing Java libraries or UI controls (JApplets) • Highly Independent – Java “gratis” or Oracle support contract – Controlled Java updates – Independent of 3rd-party browsers (Firefox, Chrome, Safari, IE, etc) 21 New Access Model for your Web Application Java Desktop Application Embedded Browser with your website Legacy Applets and/or New Rich Features, as Libraries
  • 21. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | JavaFX • Java SE 8 – Bundled with new Javascript Engine: Nashorn – Follows ECMAScript 262 v5.1 • JavaFX 8 – Supports embedded Java Swing components (migrate visual JApplets) – WebView • Support for HTML5 tags, CSS3, Javascript, and DOM tree – WebEngine supports bi-directional calls between Java APIs and Javascript in webpages loaded inside WebView 22
  • 22. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | JavaFX 8 – Web Engine • html5test.com • acid3.acidtests.org • webkit sunspider 0.9.1 test 23 Standards compatibility and performance analysis Firefox 29: 244.8ms Chrome 34: 259.8ms JavaFX 8: 252.4ms http://www.websocket.org/echo.html
  • 23. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda Why are you still using Applets? A brief history check. The Future of Applets is tied to Browsers Seamless Migrate from Applet/Browser to Java Desktop App Hybrid JavaFX Desktop Applications Distribution Models for Java Desktop App 1 2 3 4 5 24
  • 24. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Distribution Models for Java Desktop Apps How to distribute your application to your users 25
  • 25. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Before distributing, you must package it • Tool name: javapackager (pka javafxpackager) – Support on NetBeans out of the box – Also as Apache Ant task • Supported Installers – Windows: EXE/MSI – Mac OS X: DMG – Linux: RPM/DEB – Others: installer/image 26 Java tool to package your app and JRE on native installers
  • 26. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Options of distribution models • Applet and web application, on a browser – This is where you are today • Java Web Start – Java Desktop application loaded off of browser. Security checks are kept • Standalone: download links of native installers or the JAR file – Native installers: user double click and install as desktop standalone application – JAR file: user must have Java previously installed • Appstores for General Purpose Desktops/Laptops – Users are comfortable with this model, since it’s how they install apps on mobile 27
  • 27. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Java Web Start • Application files (JARs), like Applets, are hosted on website server – User clicks on a link to load the application via JWS – When remote JAR files are updated, JWS automatically updates on user’s computer • With a Hybrid JavaFX Desktop application in place, this is the easiest model to move forward before a full replacement, off of browsers – Users will perceive as a “new window” • Disadvantages – Java must be installed prior to execution – Developer must still keep up-to-date on new security Java updates, due to automatic Java updates in some operational systems 28
  • 28. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Download Link • Provide users with a “Download” section on the website – JAR download for reduced package size • User must have Java installed – Native installers per operational system • JRE and application bundled into native installers for Windows/Mac/Linux 29
  • 29. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Appstores for General Purpose Desktops/Laptops • Publish the native installers (JRE+application bundled) on 3rd-party appstores for PCs – Decide which version of Java JRE is bundled. Won’t conflict with any other JRE installed, or bundled with another application – Keep control of when to upgrade the version of JRE bundled with the application 30
  • 30. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 31 Comparison based on external users accessing the application from their own PCs Differences between Distribution Models for the Application Developer Applet Web Start Download Appstore Unnecessary to Have Java Previously Installed NO NO YES YES Independent of Java Browser Plugin NO YES YES YES Unaffected by Java “gratis” Auto Updates NO NO YES (1) YES Unaffected by Java LiveConnect™ Constraints NO YES YES YES Unaffected by Browsers Restrictions NO YES YES YES Application Auto Update for Users OOTB YES YES NO YES Has Control of Which Java Version Update NO NO YES YES Has Control of Runtime Environment NO NO YES YES (1) NO if user downloaded JAR file only, without bundled JRE

Editor's Notes

  • #4: This is a Safe Harbor Front slide, one of two Safe Harbor Statement slides included in this template. One of the Safe Harbor slides must be used if your presentation covers material affected by Oracle’s Revenue Recognition Policy To learn more about this policy, e-mail: [email protected]
  • #7: Created by Sun in 1995 to provide an execution environment for visual Java applications with a simple distribution model, and to “run everywhere” Local data processing 2D and 3D visualization Audio/Image processing Animations - Hardware integration
  • #9: Some sort of native plugin has to be installed on users’ computers to provide Hardware Token and/or Device Singularity/Access Origin. Applets are commonly used.
  • #12: Why “semi-transparent”? - Your website may be selling the idea of “access from everywhere through a browser”, but you require Java to execute Applets. Means users have to do 2 things before actually access your website: (a) install a browser your modern website is compatible with, and (2) install Java. Why is “Java gratis at java.com” a disadvantage? - In cases where users access websites with Applets from their own personal computers they install Java from java.com and keep up to date from there. Your company IT has no control of these computers and thus it is technically unpractical to acquire commercial support for Java. Why “Highly Dependent”? Some operational systems may impose difficulties at setting up Java correctly to run Applets on browsers (i.e. Linux) Web browsers may block, or require extra steps, to execute Applets. They are in control. Java Browser Plugin is the piece of Java that actually runs Applets. Changes here may affect how Applets are executed, and may require changes in the Applet code/manifest/signature. Why is Automatic Update a “Necessary Evil” ? - Oracle issues security updates to Java to keep users safe. - These updates may require applets to also be updated to comply with new security requirements. - Applets not updated or compliant with new requirements may be blocked by these security updates.
  • #13: Chrome “press-release” - http://blog.chromium.org/2014/05/update-on-npapi-deprecation.html Firefox “press-release” - https://blog.mozilla.org/futurereleases/2013/09/24/plugin-activation-in-firefox/
  • #21: WebView is the Embedded Browser component of the JavaFX Platform Bundle JRE with your application. When you package your application in this architecture, the JRE is installed as part of your application, not as a pre-required software. This means it will be only used by your application and not shared with other apps nor the browsers. It is as if JRE+Your_App were one thing only.
  • #22: Why “Advantages”? Controlled web environment: the Java Virtual Machine provides an environment not tied to specific operational systems, and since now it provides its own embedded browser, it is now also not tied to specific web browsers if one wants to build their “own browser” using the Java WebView component Reuse your existing web app: you don’t have to write from scratch your web application (but may be require to adapt/adjust/tune). You can also continue providing users access to your web application through regular browsers that still support applets Reuse existing Java libs and UI controls: Java libraries can be easily reused within a Java desktop application. For UI controls, these may require refactoring, but JavaFX applications can embed Java Swing controls (usually used inside JApplets) Why “Highly Independent” ? You may choose to package your application with the Java “gratis” available at java.com. But remember these are not supported and they may reach End of Public Updates that may include security fixes and improvements. Since you will be in control of which JRE is bundled with your app, this technically enables you to consider a support contract with Oracle. Controlled Java Updates: again, since you control the packaging of JRE with your app, you also control when to update your application to a newer JRE and repackage it for a new version bundle. Your users won’t be required to upgrade to a newer version when Oracle issues a new update at java.com, because JRE is bundled as part of your application. Independent of 3rd-party browsers: this architecture provides an independent solution of 3rd-party browsers and focus on only the Java embedded browser. You are in control of it.
  • #24: JavaFX’s WebEngine is well capable of running most websites. Quake 3D implemented in Javascript and CSS ain’t one.
  • #29: As previously noted, the auto update feature is important to keep users safe. But application developers must keep up-to-date as well when Oracle issues a new security update.
  • #31: Enterprises these days are releasing their own native/hybrid mobile applications for iOS and Android. Still, they ignore Windows Store, Mac OS X Store and Ubuntu Software Center (Linux).
  • #32: This table illustrates an analysis of distribution models by considering use cases of customer applications being accessed by unmanaged computers. IMPORTANT The reason Commercial Support for Oracle Java is not technically feasible for Applets and/or Java Web Start is that external users (non-employees of customer holding support contract) will likely install Java “gratis” from java.com, and access from their personal desktops/laptops. If there is a problem and Oracle issues a fix for the customer, this customer would have to distribute this special JRE for their external users. The scenario is overly complicated and should be avoided. Commercial Support may be technically feasible for Applets and/or Java Web Start only when computers are managed by customer who owns the Java support contract. It should also be considered that this is for internal users only. - i.e. desktops/laptops owned by the customer and managed by an IT department