Java 9 – Evolutionary or Revolutionary Development?

Java 9 – Evolutionary or Revolutionary Development?

In just over six months, it will be ready: The Java release 9 is coming. Today we already take a look at what’s new – what is arriving and what is not.

As we constantly observe market as well as technology trends and how they can benefit the travel industry, this time we wanted to highlight the next Java version, which is just around the corner. This becomes specifically interesting as we are in the process of providing value added travel services completely decoupled from the user interface as a restful interface so that anybody can create an innovative user interface and book travel – be it chatbots, virtual agents, a mobile interface or an Online Booking Tool.

With its lambda expressions, Java 8 brought one of the largest syntactical changes in the history of Java, which the developer community met with great acceptance. Other essential advancements included the new stream, date and time libraries. Now Java 9 is ready to be introduced; functionally finished and in its testing phase, its release is announced for March 2017. Can the successor be as convincing as its predecessor? Let’s have a look at the changes: In three cases it’s a thumbs up and in two cases we are disappointed, as these features did not make it into the release.

Modularization: The Jigsaw Project
The previous modularization concepts of the Java platform are not sufficient. Developers who work in host transaction programming often wonder about the lack of modularity of Java systems set up at runtime. They have to get by with libraries such as OSGi, which are outside of the Java platform, in order to achieve modularization. Java 9 now offers a solution: Each module can define with which other modules it is integrated as well as which interfaces should be visible outside of the module’s limits. In this way, each module can be assigned to its own environment (class loader) and the module-specific packages and classes run independently from one another, even at runtime. Aside from its ability to modularize applications on Java board tools, the Java platform itself is modularly built. This option for flexibility has the goal, for example, that on mobile devices an entire JDK must no longer be provided.
Java’s first REPL function
Java 9 will provide a new REPL-shell (Read, Evaluate, Print and Loop) feature called JShell. Developers currently need to revert to a third component. With this feature, functions or algorithms can be tested without a Java class needing to be written for them. Interestingly, JShell also offers the option to save or reload a workspace.
Support for HTTP/2
Java 9 supports HTTP/2, which as a successor brings numerous performance improvements to the HTTP/1.1 standard. These include the option for the server to actively send content to a client without needing to wait for client requests. The multiple use of an HTTP connection for inquiries (multiplexing) presents a further optimization measure. As a result, the performance of dynamic web applications with a large number of dynamic updates will be further improved in practice.
No data types for monetary amounts and exchange rates
Following the changes that Java 8 introduced to date and time libraries, data types for monetary amounts and exchange rates were to be introduced in Java 9. In this way, an option would have been provided to directly support the pricing information of data providers (for example, European Central Bank and International Monetary Fund) or to develop one’s own data provider (for example, for a real-time or near real-time supply of pricing information).
Lightweight JSON API is a long time coming
Java was supposed to have its own lightweight JSON API in the next release. Developers would then no longer need to be dependent on third-party libraries. This extension has been omitted, although it would have had a high practical relevance: JSON has become the standard exchange format in the communication to REST services.

Competitiveness requires stringency

To return to the initial question: Java 9 – evolutionary or revolutionary advancement? Compared to the changes from Java 7 to Java 8, this jump is certainly smaller and so this is more a case of evolution. Nevertheless, the ability to modularize within the Java platform is a milestone that enhances maintainability and increases flexibility through a simpler componentization. The question as to whether there is an option to migrate existing Java 8 applications to a module-based Java 9 application will be of interest. It can certainly be criticized that the data types of monetary amounts and exchange rates as well as a lightweight JSON API did not make it to the major release and that alternative solutions will therefore continue to be required here. Furthermore, the shift of the release date from September 2016 to March 2017 interrupts the necessary stringency of its development.

A detailed overview of the new features is provided at the highlighted link.

 

Christian Henkel, Johannes Fuchs and Thomas Schnupp, my colleagues from the PASS Research Development, were involved in the research and writing of this article. I would at this point like to sincerely thank them for the support.

 

Picture credit: shutterstock

Leave a reply

Your mail address will not be published. Required fields are marked with *.