JAVA CLIENTS AND JAVAFX THE DEFINITIVE GUIDE

Stephen Chin JFrog Developer Relations @steveonjava https://jfrog.com/shownotes/ HOW I PICTURED MYSELF DURING @steveonjava THE APOCOLYPSE https://jfrog.com/shownotes/ HOW I ACTUALLY LOOK DURING THE @steveonjava PANDEMIC https://jfrog.com/shownotes/ @steveonjava HISTORY OF JAVAFX

2006: F3 Form Follows Function

2008: JavaFX 1.0 Initial Release of JavaFX

2011: JavaFX 2.0 API (JavaFX Script Removed)

2012: JavaFX 2.2 JavaFX Bundled with JavaSE 7u6

2014: JavaFX 8 JDK Integration

2018: JDK 11 JavaFX Removed from the JDK https://jfrog.com/shownotes/ @steveonjava https://jfrog.com/shownotes/ @steveonjava GLUON MOBILE

• JavaFX 11, 12, 13, and 14 builds • SceneBuilder GUI Builder • JavaFX on iOS and Android https://jfrog.com/shownotes/ @steveonjava https://jfrog.com/shownotes/ @steveonjava

JAVAFX USE CASES https://jfrog.com/shownotes/ MINT TRAINING AND RESOURCE MANAGEMENT @steveonjava https://jfrog.com/shownotes/ NASA DEEP SPACE TRAJECTORY EXPLORER @steveonjava https://jfrog.com/shownotes/ DEVOXX CONFERENCE MOBILE APPLICATION @steveonjava https://jfrog.com/shownotes/ SPACEFX GAME @steveonjava https://jfrog.com/shownotes/ @steveonjava

JAVAFX 3D https://jfrog.com/shownotes/ @steveonjava MESH GEOMETRY (3D SHAPES)

■ Predefined shapes ■ Box ■ Cylinder ■ Sphere ■ User-defined shapes ■ Using TriangleMesh / MeshView

14 https://jfrog.com/shownotes/ @steveonjava UV MAPPING TEXTURES TO SHAPES

Tip: A texture is a 2D image to be mapped on a 3D surface

15 https://jfrog.com/shownotes/ @steveonjava 3D LIGHTS

■ Lights are nodes in the scene graph ■ PointLight ■ AmbientLight ■ Default light provided if no active lights

16 https://jfrog.com/shownotes/ @steveonjava FXYZ

• Built-in shapes • Lights, materials, camera • FXyz 3D https://github.com/FXyz/FXyz https://jfrog.com/shownotes/ @steveonjava

1. PACKAGE YOUR PLATFORM https://jfrog.com/shownotes/ PACKAGES KEEP GETTING LARGER @steveonjava https://jfrog.com/shownotes/ @steveonjava PACKAGING JAVAFX APPLICATIONS

• Works, but not recommended: • ¨FAT JAR¨ – Package all your dependencies and run on command line • Recommended: • jlink – Requires modular apps • jpackage – Available now in Java 14 • New options: • Native image – Use Graal to create a native application • OpenWebStart – Open source version of Web Start for modern JDKs by Karakun https://jfrog.com/shownotes/ @steveonjava CREATE STATIC IMAGES

https://www.gluonhq.co m https://jfrog.com/shownotes/ @steveonjava

2. TARGET MOBILE FIRST https://jfrog.com/shownotes/ @steveonjava MOBILE WEB TRAFFIC

Mobile Web Traffic 52.2% 50.3%

43.6%

35.1%

27.1%

16.2%

10.7% 6.1% 0.7% 2.9%

2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 https://jfrog.com/shownotes/ @steveonjava JAVAFX ON MOBILE

• Native-image from GraalVM • OpenJDK 11+ & OpenJFX 11+ • Mac OS X, , iOS, Android • Gradle/Maven plugins • IDE Support for IntelliJ, Eclipse, and NetBeans • https://github.com/gluonhq/client-samples https://jfrog.com/shownotes/ @steveonjava

3. BUILD FOR THE CLOUD https://jfrog.com/shownotes/ @steveonjava ETEOBOARD https://jfrog.com/shownotes/ @steveonjava JAVAFX ON THE CLOUD

• The Weather App • Don’t reveal your credentials!

RemoteFunctionObject functionObject = RemoteFunctionBuilder.create("weather") .param("q", CITY) .object(); https://jfrog.com/shownotes/ @steveonjava JFROG FREE SUBSCRIPTION

https://jfrog.com/artifactory/start- free/ https://jfrog.com/shownotes/ @steveonjava FROM JAVAFX EXPERTS TO THE COMMUNITY https://jfrog.com/shownotes/ @steveonjava Q&A