JAX London Blog

We had to have modular Java

20 Aug 2018

Source: Shutterstock

In this interview, Simon Ritter discusses why he prefers the six-month release cadence for Java and the strengths of Java as a “blue collar” language.

JAX enter: How do you feel about the new six-month release cadence? After past delays, do you think it’s too much (or too soon) to have two feature releases per year?
I think the idea of a faster release cadence is, in principle, a good idea. Often developers have been frustrated by the slow progress of Java (both the language syntax and the core libraries) due to the long time between releases (since JDK 5 this has ranged from just over two years to just over four and a half). A faster, predictable release schedule means access to new features more quickly. The downside of this is how users approach deployment. Do they switch JDK every six months, every year or just for what Oracle are classifying as Long Term Support releases (but only if you pay)?

JAX enter: Have you migrated to Java 10 yet?
I have, but that’s not a significant data point! All my code is used for demos to show people how to use new features (like local variable type inference) so I always make sure I’m using the latest version. For most of my personal projects, I’m still running JDK 8.

JAX enter: If you could replace any feature in the current release with a different one, what would that be?
Tough question. I’ll be contentious and say I’d rather have value types, which will provide a lot of performance and clearer code benefits than local variable type inference. Adding var to Java is never something I’ve felt myself needing in the past.

JAX enter: Stephen Colebourne told us at last year’s JAX London that “Java 8 will satisfy us for a good few years until there’s something really big and important.” Can Java 11 meet those expectations?
No. The JDK 11 release contents are pretty much locked down now as it just entered the ramp-down phase. If you look at the list of JDK Enhancement Proposals (JEPs) that will be included there is only one for the language, which is an extension of local variable syntax to Lambda expressions. Considering Lambdas already have type inference, the only use of this is if you wanted to include annotations on Lambda parameters. Most of the changes to the core libraries are the removal of the java.se.ee aggregator module and its components (like java.corba, java.bind and java.xml.ws). Hardly compelling reasons to migrate.

JAX enter: Speaking of Java 11, how do you feel about the fact that JavaFX will be decoupled from the JDK?
On the one hand, I think it’s a shame. JavaFX Is an excellent library for developing rich client applications that aren’t suited to the typical web/HTML5/CSS/Javascript approach. On the other, the reality is that, whilst it is popular with many people, it never really gained critical mass as a core part of the JDK. Thankfully, it is a separate open source project and people like Gluon are doing a lot of work to ensure that it is still easy to use JavaFX with JDK 11.

JAX enter: What’s your favorite JEP [targeted to JDK 11] so far? Why?
I think it would be Flight Recorder (JEP 328). Both Flight Recorder and Mission Control are great tools for analysing application performance and identifying possible issues. Having this included in the JDK is really the last piece of eliminating functional differences between an OpenJDK binary and the Oracle JDK binary.

JAX enter: How do you feel about modular Java? Do you prefer Jigsaw or Maven? Why?
We had to have modular Java. If you go back to JDK 1.0, there were only 211 classes in the core libraries. In JDK 8 there’s over 4,500. We needed to organise this rich set of functionality in a more logical and configurable way. For me, it’s not a question of Jigsaw or Maven (maybe Jigsaw or OSGi). The developers of the Java Platform Module System did a great job; however, I would have preferred to see them focus just on modularising the JDK and letting people use other frameworks on top of that (like OSGi) to modularise applications.

JAX enter: What is still missing from the latest Java versions? What are the issues that require more attention?
From my perspective, nothing is missing. There’s always more that can be added (like value types). I’d like to see some of the bigger OpenJDK projects deliver; Amber for less boilerplate code, Valhalla for value types and Loom for fibres.

JAX enter: Why do you think that Java has maintained its dominant position as one of the top programming languages for such a long time? What does programming in Java offer to developers and organizations?
James Gosling famously described Java as a ‘Blue collar programming language’, and that is spot on. It’s a platform that was designed to get the job done. There are many other languages with different benefits but Java seems to provide a lot of what developers are looking for. The other really key benefit for Java is the JVM. Even setting platform neutrality aside the performance and reliability benefits of a managed runtime are what gives Java much of its strength and appeal.

JAX enter: What is your favorite framework or tool for Java? Why?
I’m really in the minority, but I particularly like Netbeans as an IDE. IntelliJ seems to have taken over as the most popular from Eclipse, but I still find Netbeans has everything I need to develop code quickly and easily. I’m hoping that with Oracle contributing it to the Apache Foundation that it will continue to be developed and keep up with the faster release cadence of the JDK.

Simon’s session at JAX London 2018

Behind the Tracks

Software Architecture & Design
Software innovation & more
Architecture structure & more
Agile & Communication
Methodologies & more
Emerging Technologies
Everything about the latest technologies
DevOps & Continuous Delivery
Delivery Pipelines, Testing & more
Cloud & Modern Infrastructure
Everything about new tools and platforms
Big Data & Machine Learning
Saving, processing & more