“Is Java dead?” And other questions answered by our Java tech lead.
Thinking of using Java for your next project? If you’re like most people, you probably have a lot of questions. And given the influx of newer technologies, you might even feel confused.
To answer these questions, we consulted with our Java tech lead Alexander Belyaev. Alexander is an invaluable member of our team—and you’ll soon find out why. Here, he gives us an insider’s look at the day in the life of a Java tech lead, and expertly addresses the pros and cons you should consider before using Java in your next development project.
For me, the tech lead role is an extra role. My primary role is as a developer. So, my typical workday looks like a developer’s workday. I write code and documentation, review code written by colleagues, and discuss current problems with the team.
- Backward compatibility on source level. This means that source code written with older versions of Java will compile without (or with minimal) modifications on newer versions of Java.
- Backward compatibility on binary level. This means that code compiled for older Java will run on newer Java.
- Tons of open-source libraries which you can use for free, so you don’t have to spend time re-inventing the wheel.
- Accessible support. Another benefit of Java being an open source platform is that it is supported by major companies like Oracle, Google, and Red Hat. So you don’t have to worry that support will be suddenly dropped.
- Java programs are cross-platform and can run on any OS and CPU architecture where JVM is implemented.There are many developers who know Java, so you don’t have to ever worry about not finding a replacement for a developer who decided to leave your company. Java is relatively simple and easy to learn, which means that there are always a lot of junior developers on the market.
- The need for a predictable reaction time to external actions. Java uses Garbage collector (GC) for memory management and it may sometimes pause the whole application for a significant amount of time (seconds). You should definitely not use java to control CNC machines, for example. The use of Java in realtime games, for example, may require you to tune GC settings and optimize code to reduce memory allocations.
- Lack of language features (without changes) that other modern languages have. Due to backward compatibility, it’s hard to make changes to the language that won’t break existing code. Another thing that slows down the evolution of the language is that every change of the spec must be approved by multiple companies (as part of the JSR process). On the other hand, this reduces the chances that poorly designed changes will be applied. There’s a way to overcome this problem by using languages running on JVM, like Scala and Kotlin.
- Manual memory management is required because GC overhead becomes too high. This usually happens on large (tens and hundreds of Gigabytes) heaps and objects with an average lifetime of minutes and tens of minutes. Java provides two ways to exercise manual memory management which are Direct ByteBuffers and memory allocation via Unsafe class, but this might not be enough. This is a common problem for all languages that use Garbage collection.
- Conducting automated testing of user interfaces (using Selenium)
- Building process automation using Gradle
- Implementing cross-platform desktop GUI applications
- Creating Android applications
On the other hand, Java offers better runtime performance and type checking during compilation, which allows you to catch errors during compilation, as opposed to when the program is already running. To summarize, Python is good at scripting, Java is good at handling complex business domains.
For example, we are currently helping a leading application performance company build new systems on Java. Their old systems are implemented on a variety of technologies (C++, .NET, Python) and the cost of supporting these were high since they needed multiple developers (at least one per technology) who knew these technologies.
Thank you, Alexander!
Need Java support?
Not only can we offer reinforcements by putting you in touch with one of our talented Java developers, we can even mobilize an entire team that takes care of the whole development process for you. Contact us at firstname.lastname@example.org to discuss your needs—>and get your project moving.