As of Java 9, new versions of Java arrive at a fast and furious pace. In this blog, I write about the challenges of updating the Core Java video courses.
22 years ago, the first print edition of Core Java was published, when Java 1.0 was proudly presented to the adoring public. With each new edition of Java, I update the book. Since the book is produced from an XHTML file, this isn't too hard. (Why not markdown or AsciiDoc? I'll leave that for another blog.)
The video course is a different matter. It is amazing how a good video editor can cut out bloopers and rearrange segments. But it would be really time consuming to, say, change all
InputStream in = new FileInputStream(...)
var in = new FileInputStream(...)
in the slide background. And if I ever said “here we declare a variable of type
InputStream”, then that segment would have to be re-recorded.
And now there is a new Java version every six months! I don't know how people will adapt to that.
But surely one part of that adapation is to know about the new features, so I figured I'd have to include them.
We decided to tackle this in two ways. At the end of each segment of the regular course, there is a news flash for Java 9/10, and, when it comes out, Java 11 and beyond. Fortunately, so far, most individual changes have had fairly localized impact. (By a stroke of good luck, I had used a pre-release version of JShell—by far my favorite Java 9 feature—in the Java 8 videos.)
In addition, I gather all the changes into a breezy “the good stuff” lesson in the “Core Java for the Impatient“ course. Check it out if you have a Safari subscription and want to quickly come up to speed.
That course also has a section about modules (purposefully separated from “the good stuiff” 😀). When I recorded the section on open modules, I needed a plausible use case of a module that requires reflective access to classes from a different module. I used JAXB to convert a POJO to XML. That's a fine example. If the POJO is a module, that module needs to open itself to the JAXB module, or the reflection will fail.
Except, that JAXB is removed from Java 11. As I wrote in this blog, it's not yet easy to direct readers/viewers to a replacement. In the print book, I am replacing the example with JSON-B, whose implementors have done a better job with modularization. (The Java EE JAXB implementation is more complex than the Java SE version that will soon be gone, and I couldn't predict when it would be available as a module.)
When Java 11 comes out, we'll replace that segment.
Finally, when I recorded the Java 9 videos at the beginning of the year, the word from Oracle was that JavaFX was the preferred toolkit for implementing modern “rich client” user interfaces. So, I dug a little deeper into JavaFX. I decided that I could live with the architectural strangeness of the properties system, and that the controls really were pretty good. I recorded a crash course and even gave the technology the “exceeds modest expectations” award in the summary slide. A couple months later, Oracle decided to make "JavaFX easier to adopt by making the technology available as a separate download, decoupled from the JDK” and “clear the way for new contributors to engage in the open source OpenJFX community”. That's corporate speak for “we are washing our hands of this sucker”.
Oh well. For now, I left the crash course as a free bonus feature, but it will probably not find much traction. Maybe we should donate it to the open source OpenJFX community?
Comments powered by Talkyard.