days
0
-74
-3
hours
0
-8
minutes
-2
-9
seconds
-2
-6
search
New features and what's next

Java is immortal and feels good: 2020 results and 2021 trends

Alex Yelenevych
© Shutterstock / Zadorozhnyi Viktor

Java in 2020 is overgrown with new features and was released twice right on schedule, despite the global turmoil. Java will remain one of the main platforms for developing enterprise applications (that is, corporate applications used by large companies to make money.

Every year they predict a quick death to Java, but this doesn’t happen, and it won’t happen very soon (it will never happen!, anonymous note). Java in 2020 is overgrown with new features and was released twice right on schedule, despite the global turmoil.

Naturally, there are global trends, and the main one is “Covid-19 and how to get out of it”. This very “how to get out” and corrected to some extent with IT trends and now about everything in order. So let’s start with what awaits our favorite language directly, and then — what awaits the IT sphere. The development of which, of course, affects such tools as Java.

SEE ALSO: Keeping Your Java Applications Secure

Java and its important innovations

Java will remain one of the main platforms for developing enterprise applications (that is, corporate applications used by large companies to make money. Such applications have a large code base and high-reliability requirements). Java fits well into a microservice architecture, although it is not the only option for microservices architecture.

Java has become more predictable. The releases happen every six months, regardless of disasters, pandemics and crises. That’s good: a little isle of stability in such an unstable world doesn’t hurt. In 2020, we received two updates, 14 and 15.

Nevertheless, according to a survey conducted by JetBrains, Java 8 remains the most popular version (75% of respondents), whereas Java 11 occupies second place (32% of respondents). Why is that?

It’s simple. It was in Java 8 that the most revolutionary innovations appeared that helped speed up the work of programmers and make it more comfortable. This is primarily about lambda expressions and functional interfaces. As for the popularity of Java 11, the secret is also simple: it’s the LTS version, that’s, one that developers will officially support for eight years. The next LTS release is Java 17, and it should be out in September 2021. So it’s logical to assume some interesting innovations and polished JEPs from previous versions are in it.

New important features of the 2020 versions (14 and 15)

Sealed Classes. This is one of the most significant new features in Java 15, and the only change to the language. Now it’s introduced as a preview feature.

Java as an OOP language is an object-oriented language, so it supports inheritance. That means that common state and behaviour can be abstracted to a superclass and shared by subclasses. So you shouldn’t reproduce the instance variables or methods of the parent class in each child class. Before the JDK 15, the only right way to control inheritance was the final modifier because it prevents any class from extending the one using the modifier. The alternative of inheritance control is declaring a class or its constructors package-private. Not the best approach! Sealed classes allow to restrict which other classes and interfaces may extend them.

Records are available in the second preview for JDK 15, and this is something completely new to Java. In fact, we have a new data type that was developed during the Valhalla project. Records are similar to enums and they allow you to simplify your code. Essentially, they replace classes that have state but no behavior. Simply put, there are fields, no methods. Records let you declare a class very briefly, and constructor, getters, equals methods, hashCode and toString will be added automatically.

Text blocks first appeared in Java 13 and later in JDK 14 as a second preview. They are multi-line string literals that prevent the need for most escape sequences, automatically formatting the string, and also allow the developer to format the string as needed. This useful feature is now available in Java 15 as the final and permanent functionality of the language.

Hidden Classes that are generated dynamically at runtime. “Ordinary” software developers maybe won’t estimate them, but everyone who works with dynamic bytecode will find the benefits of them. They can’t be directly linked to the byte code of other classes. There is no access by name for such classes and they will be aggressively thrown out of memory.

Well, a big probability that we meet these features in future releases including important JDK 17.

Spring framework: continue to expand its ecosystem

Spring is the most popular Java framework, and it’s used in almost every project. It’s so all-encompassing that even experienced developers can discover its subprojects, they’ve never seen before. So nothing strange, Spring’s ecosystem will continue to evolve.

Also I want to say that Project Reactor and r2dbc, which originated as subprojects of Spring, now turns to the standards for the reactive approach to development.

Project Reactor is a Java 8 library that implements the reactive programming model. It is built around the Reactive Streams Specification, a standard for building reactive applications. R2DBC (Reactive Relational Database Connectivity) is an open source project dedicated to reactive programming for SQL.

Newcomer: GraalVM Native Image

One of the most interesting trends that is still on the rise is GraalVM Native Image, which allows you to turn a traditional Java application into a binary application that does not require a JVM and accompanying libraries for its work.

Such a binary file fits very well into the microservice architecture and serverless approach, since it allows you to start a new instance of the application very quickly and does not require “warming up” the JVM.

What Java-related areas of IT will develop

All the Remote access things

As 2020 has shown, predictions are sometimes very inaccurate. A black swan named Covid-19 came to visit us and ruined all our plans and a number of forecasts. However, the IT industry has suffered less than many others, and in some ways has won. First of all, we are talking about technologies related to remote work and learning, as well as distributed computing.

Messengers, audio and video conferencing systems, data transfer technologies, clouds for general access with the transition of many employees to remote mode have become even more important tools than they were before. Hybrid solutions for deploying applications both in the clouds and on-premises data centers have been developed. Services for secure remote work are also extremely important. If there are no other huge unexpected problems such as COVID-19, but from the other side, IT will continue to grow in 2021.

Most of the backend of such large systems, online platforms and web applications are written in Java. This versatile and powerful language allows you to create fault-tolerant, secure systems that can be maintained for many years. Of course, Legacy code is somewhat a Java problem, but it’s also a force. I mean even if the development of everything new stopped in one moment, then Java programmers who could support the legacy code would be needed for another 10 years.

Mobile development

The mobile application market will continue to grow even faster than before. Because of the plans of SpaceX to fully deploy in 2021 Starlink, a global satellite system that should bring high-speed broadband internet access where it used to be unreliable, expensive, or completely inaccessible. It will help people a lot to use services from their phones wherever they are. So Starlink may well stimulate the mobile market.

According to IDC 85% of smartphone shipments in the second quarter of 2020 were made by Android devices and this result is more or less stable. Today’s Android programming is based on two languages, Java and Kotlin. So these two languages will be in high demand. BTW, both of them are JVM languages, somewhat relatives, and the only problem of young Kotlin is that it is hard to learn it if you don’t know Java.

AI development

You’ve probably already noticed how artificial intelligence has turned from something highly specialized into an everyday thing that lives in our phones, TV-set-top boxes, websites … It’s become much more accurate in determining what we want, and, to be honest, it’s influencing what we want by slipping in the right ads. This will be a trend in 2021 and later.

Most likely, deep learning, machine learning, speech processing, complex pattern recognition and other artificial intelligence technologies will continue to evolve. I guess these technologies will become even more common and learn even more about us! AI technologies are developed using a variety of tools and languages, including Python and Java.

Big Data

Java is one of the most popular languages to develop big data projects. Big Data is continuing to grow, so it is logical to suggest Java growing here as well.

I presume the growth of the most popular Big Data Java set of tools Apache Hadoop in 2021.

Apache Hadoop is one of the foundational technologies for big data, and it is written in Java. Hadoop is a free and open source framework with utilities, libraries, and frameworks managed by the Apache Software Foundation. Originally built for scalable and distributed yet reliable computing and storage of vast amounts of information, Hadoop is naturally becoming the hub of big data infrastructure for many companies. The Hadoop ecosystem includes software tools such as Apache Spark, Apache Hive, Apache HBase, Kafka, etc.

SEE ALSO: Type-safe Unit Expressions for Java (and you)

SaaS, PaaS, FaaS and microservices

I guess that in the coming years, products will move more towards SaaS and PaaS models. For such models, the programming language is not very important. You may choose any one that’s comfortable for you from the top, such as Java or Python. Interaction takes place according to REST, this is the de-facto standard. The main goal is flexibility, so microservices will also be in trend. This reduces development costs, testing complexity, and development time. However, it increases the infrastructural complexity of systems. In this regard, the DevOps profession is gaining popularity.

This trend fits well with mobile development because logic is processed on the server, cluster, or cloud, and the mobile device only acts as a view (with a few exceptions). Therefore, it is easy to write applications for mobile devices.

Another trend that will become even more prevalent in 2021 is serverless architecture or FaaS (function as a server). However, don’t think that there are no servers in this type of architecture. In fact, the solution is built on servers, it’s just that in this model, the developer focuses exclusively on coding, and not on infrastructure.

That is, setting up operating systems and hardware, network configuration, and application scaling is the responsibility of a serverless service provider, such as Amazon or Google. In theory, all major cloud providers will offer serverless options to their customers.

This approach lowers operating costs, providing greater flexibility and dynamics in the software development process.

The main tool here continues to be Kubernetes and the infrastructure around it in the form of a Service mesh. Every serious Cloud provider provides the opportunity to use a Kubernetes cluster. And if the application is written with its launch in Kubernetes in mind, this makes it much easier to deploy and scale.

Kubernetes (K8s) is open source software for automating the deployment, scaling, and management of containerized applications.

Kubernetes groups the containers that make up an application into logical units for easier management and discovery.

Kubernetes manages and runs containers on a large number of hosts, and provides co-location and replication of a large number of containers. The project was started by Google and is now supported by many companies, including Microsoft, RedHat, IBM and Docker.

Author
Alex Yelenevych
Co-founder and CMO at CodeGym.cc, an interactive educational platform where people can learn Java programming language from scratch to Java Junior level. Visit him on LinkedIn.

guest
0 Comments
Inline Feedbacks
View all comments