Java Development in 2022: Predictions and Selected Trends
In this article, we will try to guess and predict how the industry will face the new challenges, and what innovations and developments will affect it the most.
Join the DZone community and get the full member experience.
Join For FreeLast year was interesting — a new LTS release, some amazing successes, but also a global vulnerability was discovered. In this article, we will try to guess and predict how the industry will face the new challenges, and what innovations and developments will affect it the most.
General Trends
1. Migration From Java 8
A lot of apps still work on Java 8 — and it is easy to see why. It is still supported by many vendors, and there are many steps you need to take to migrate from 8 to 9 and higher because of radical changes introduced in Java 9. But we think that 2022 could be the year many people will finally decide to move to the latest LTS version for several reasons.
- Last year there was the first LTS release in 3 years, and it is out long enough to be considered secure and reliable. Enterprises are already trying it out and giving feedback. It is important to mention that while the latest LTS Java version is 17, many developers will likely move to the previous LTS version, which is 11. It is considered to be just the right balance of stability and features. But those who utilize Spring in their development will choose Java 17.
- The new release cadence will make the process of constant migrating much smoother in the future.
- The end of support for Java 8 is coming closer.
This year we may possibly see the beginning of the process of global migration. The new business challenges require modern solutions, and now you can actually test them. If you could afford an upgrade, we say — do it and join those who move the industry forward!
2. Better Cloud Support
Microservices, containers, message brokers, and native images are not new, but are still actively developed and enhanced every year! In 2022 we can expect not only better stability, speed, and size of these, but even the new operating system that will be fine-tuned for Java containers of any kind and will make them faster and even more secure. In fact, this one is not a guess — BellSoft will very soon release this new OS full of features and enhancements for Java development, and you can quote us on this.
This will make cloud utilization even more effective for running Java apps, and 2022 will be the year of cloud deployment even for cases where people used to rely on their own dedicated servers.
3. Better Support for Many Platforms
In terms of different architecture support and application compatibility between different platforms, we consider Java still to be the very best. And it will get even better in the following year!
RISC-V
The new CPU family is potentially the working alternative for x86 and ARM processors in the near future. Its most important advantage is that chips with that architecture can be developed without royalties to its owners, so many enterprises are very motivated to make it work, and the Linux Foundation announced the collaboration with RISC-V Foundation. And while now it is practically utilized in embedded devices mostly, we expect to see the newer versions soon and possibly receive the first implementation of RISC-V support in the new Java LTS release.
AArch Architecture
AArch64 and AArch32 are fully supported in Java, AArch64 support actively gets better with every new release. People who use Java 11 and up enjoy the enhanced performance with Aarch64 CPUs, and the numbers keep getting more and more impressive. We expect to find new enhancements in the following numbered versions of Java released.
Mac Support
People like Macs for their polished interface and overall good looks, and with the improved support for Aarch64 CPUs and new graphic API Java developers will take full advantage of both dated and newer Mac models using M1 Max processors.
Security Issues and The Open-Source Approach to Development
Log4Shell was the vulnerability that shook the world of Java development. Some people even said that it proved how not only Java, but the open-source solutions, in general, were unsafe.
In our opinion. This is not really the Java language problem, nor an issue in Java Virtual Machine and standard class library, though many perceive it as such. Rather this is the case where the vulnerability affected a lot of people, who did not expect it to come from Apache, which is considered to be quite secure. And critics forget that the fix was available instantly, but people were not in a hurry to apply it, as it dealt with the vulnerability of the 10th level. And an alternative is that it could be one of the issues that were not discovered at all... or found by malicious actors only and utilized by them with developers being none the wiser.
The open-source approach is not perfect, true. But still, it gives a chance to actually see the code, test it, and check before implementing it into the security process. In this case, the community failed, but the enterprises failed as well when they just took the code from the Internet and decided to utilize it without proper evaluation. And while in most cases people don’t really read the code, the open-source approach still allows you to do it at least. Sure, it is not possible to test every potential vulnerability, but some testing can be done. And if you use the closed code, you still are in danger. But now you cannot even rely on the community!
The consequences of this event will not be as drastic as some suggest. We think that developers will put more time into proofreading.
It is important to note that while there are alternative logging libraries available, they should be checked for similar or other vulnerabilities to avoid such an issue in the future. And to do that you need to inspect the code, which in turn should be open for reviewing, proving again that the open-source approach, while not perfect, is still safer in our opinion, than other methods. And the solution could be moving some projects from GitHub to the private repositories, where only selected people will have full access. Will it happen? We are not sure, but if it will, it will be a great challenge for the industry and the beginning of the end of the era.
Java 18: What to Expect
The new LTS release dictates the direction of future releases, including the next LTS one. We will not list all the new JEPs, but rather talk about the direction of the development of Java now and in the future.
- Security manager is almost gone. It was widely used for applets and webstart, and even at the beginning it was hard to configure and could significantly slow down the apps. Some new security measures will surely appear, but only time could tell, which ones will stay.
- Code snippets — for some it could be the most important enhancement. Reading the comments is now much easier and you can avoid mistakes in writing them.
- Switch expressions and pattern matching indicate the development of Java language in the areas it could be less effective than the new ones. As the syntax developed many years ago must stay to ensure maximum compatibility with older versions, the new syntax — short and easy — is implemented with many updates and JEPs. The new cycle of release is going to make the process even faster by using the previews and incubators for testing.
Java Projects
Some of the most exciting things happen outside of the main branch, in multiple Java projects that are not just a technology for testing, but in many cases are already working development solutions!
JavaFX
OpenJFX is being developed and utilized. It is going to be updated and enhanced, even if it is not a part of the main OpenJDK repository. Not all applications are web apps! It is still important for many clients and essential to some projects.
Opinions expressed by DZone contributors are their own.
Comments