JavaFX 11 under the microscope: “Decoupling JavaFX into modules is the right thing to do”
Now that JavaFX 11 is here and a new era has begun, it’s time to take a look back and a leap forward. We talked to Carl Dea, co-author of JavaFX 9 by Example about the latest release, how the community should adjust to the latest developments and more.
Now that JavaFX 11 is here and a new era has begun, it’s time to take a look back and a leap forward. If you’re wondering if the “new” JavaFX is worlds away from the “old” one, what’s the difference between a JavaFX that’s been decoupled from the JDK and the old one under Oracle’s stewardship and how the process has changed, keep reading.
We talked to Carl Dea, co-author of JavaFX 9 by Example about the latest release, how the community should adjust to the latest developments and more.
JAXenter: How is JavaFX different now than when it was under Oracle’s stewardship?
Carl Dea: To my understanding, Oracle is still stewarding JavaFX (OpenJFX), but they will take a lesser role and allow the community to steer the ship. While individuals in the community are willing to contribute to OpenJFX it was a relief to hear about a courageous move by Gluon announcing their commitment to take on a lead role in this effort. I trust they will be helping shape JavaFX’s original vision (Apps on mobile, desktop, and devices). What’s great is Gluon has already provided pre-built binaries of the JavaFX SDK for the major platforms.
JAXenter: What needs to change about JavaFX now that it’s under the community’s stewardship?
Carl Dea: I believe there needs to be a more of an official way to communicate the roadmap by showing the scheduled priorities, goals and bugs in upcoming releases. I agree with Donald Smith that an important change would be to make it simple for newcomers to become contributors to OpenJFX. What I do not want to change is the current (good) communications with existing teams (engineers/experts) at Oracle related to JavaFX.
What I do not want to change is the current (good) communications with existing teams (engineers/experts) at Oracle related to JavaFX.
JAXenter: What has happened since it was announced that JavaFX would be decoupled from the JDK? Is the process more simple now?
Carl Dea: Not sure if it’s simpler now, but time will tell. Once I heard the news about JavaFX being removed from Java 11, I felt nervous and excited at the same time (Similar to growing up and living on your own).
From a technical perspective, it would give JavaFX a chance to be updated more rapidly than ever before such as bug fixes, optimizations, and new innovations than having to wait for official JDK releases and updates.
Actually, in the beginning with JavaFX Script language 1.x it was a separate download for JDK 6 & 7 for similar reasons. Even before JavaFX 1.x, there were discussions about the possibility of breaking out Java Swing (JFC) as a separate library so Swing could get updated more rapidly instead of waiting for updates to be aligned with official releases. It goes to show you based on history that decoupling JavaFX into modules is the right thing to do.
JAXenter: What feature are you looking for in the next release?
Carl Dea: The following features may be a large undertaking for the next release, however, I would like to see these topics discussed.
1) The WebView control capable to view Youtube videos, https, and WebGL content.
2) Look at the roadblocks that’s preventing the Graal compiler from statically compiling JavaFX apps into optimized binary executables.
3) A Node that supports OpenGL.
4) Enhance the SVGPath API to support more math functions and easier ways to handle shapes. Examples might be interpolating paths (get a path’s length), shape subtraction, or shape morphing.
5) A new Skin or ‘Look and Feel’ added to the JavaFX SDK. This could be a separate project?
6) A WebAssembly and JavaFX compiler (tooling, APIs, and examples).
7) Always improve JavaFX 3D.
8) Dockerize OpenJFX
JAXenter: How can people develop JavaFX applications, now that JavaFX has been decoupled from the JDK? What are the steps?
Carl Dea: Simple! Go to https://openjfx.io/, click on Documentation and Getting Started.
SEE ALSO: JavaFX 11 is here!
JAXenter: Development on JavaFX 12 has already started. Why does JavaFX follow the same cadence as Java SE and what are the benefits?
Carl Dea: While I agree with the idea of following the same cadence as Java SE, I don’t want updates and bug fixes to lag behind. In other words, within a major version, OpenJFX should keep releasing updates provided they are binary compatible.
JAXenter: How should JavaFX evolve? What should be its focus to keep the community’s interest alive?
Carl Dea: Oracle has helped grow the bulk of JavaFX and the community will most likely not have to make massive changes. As far as keeping the community’s interest alive I often think of the original site JavaDesktop.org. In the past, they showcased many successful Java Desktop applications. I hope that Oracle and the community could revive something similar to show off what is possible in the real world.
I really wish there was a magazine dedicated to Java Desktop.
When it comes to building desktop applications it’s hard to find a UI technology like JavaFX.
JAXenter: Are you thinking of switching to another UI technology now that JavaFX has been decoupled from the JDK?
Carl Dea: No. When working with customers who are still using JavaFX we control the deployed executables and therefore having JavaFX decoupled has no real effect on the user. Being decoupled allows you to get the latest JavaFX modules (for that major JDK version). Also, this allows you to build apps in a modular way, making things easier to manage.
JAXenter: Why would you use JavaFX instead of other UI technologies?
Carl Dea: I’ve used many UI technologies and I find that all have their pros and cons depending on the problem you are trying to solve. But when it comes to building desktop applications it’s hard to find a UI technology like JavaFX. It’s hard-pressed to find an open source UI technology that has all the following capabilities under one roof: Custom Controls, Media, WebView, 3D, Controls, Canvas, Animation, just to name a few.
JAXenter: Do you see a place for JavaFX on desktop, mobile, embedded?
Carl Dea: Definitely yes to all three. By using JDK’s jlink, a developer could build binary images of desktop applications. This would allow applications to be installed and run on all the major platforms. Also, Gluon’s framework will allow the developer to create JavaFX apps for desktop, mobile, and embedded using one codebase.