Twenty-year-old Java, despite being long in the tooth, is still the most popular programming language for developing enterprise applications. The TIOBE index, which is one measure of the popularity of programming languages, shows that Java has been number one or number two for the past decade and has had a recent uptick in popularity.
Credit: TIOBE Index for April 2016
One interpretation of this graph shows Java (blue) being overtaken by C (black) over the course of the decade. What this interpretation belies is the fact that Java and the C family (C, C++, and C#) of languages are generally used for different purposes. Because C is a lower-level language that is faster and requires less memory than Java, C is often used for many more cutting-edge applications like gaming and virtual reality.
Higher-level Java applications are usually compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture, which make them easier to deploy in enterprise environments. The prominence of C and Java atop the TIOPE index isn't by accident, since both of these languages have powerful advantages and features that developers continue to use to create robust applications and software.
It's worth remembering that the TIOBE index is not about which is the most popular programming language or the language in which most lines of code have been written -- that is likely to still be COBOL, until every single mainframe is unplugged -- it's an attempt to measure the size of each language's community of developers. A Java design goal from the beginning was that it needed to be simple, object-oriented and familiar, which allows enterprise Java applications to be maintained by others in the large established base of Java developers.
Portability is also one of the key strengths of Java. Java software runs on everything from laptops to data center servers, from game consoles and IoT devices to scientific supercomputers, which makes it a good choice for business applications that need to run on several platforms. Java's "write once, run anywhere" motto may qualify as hyperbole in some cases, but it's closer to being a true cross-platform programming environment than any of the other languages on the TIOBE list.
Your enterprise's investment in Java applications ought to be safe, at least for another decade or two.
Android development is a main driver in the recent uptick in Java's popularity and the language's re-emergence at the top of the TIOBE index. Google has never officially commented on why it's using Java for Android software developer's kits, but there are several obvious Java features that may have swayed their decision, such as the fact that Java apps run in a securable VM where there's no need to recompile them for every Android device. Not to mention the large number of open source libraries and development tools available to make developers' lives easier.
Another one of the main reasons for Java's popularity with a large swath of developers is the Java Community Process (JCP), which is the mechanism for developing standard technical specifications for Java technology. The JCP allows any Java developer to review and provide feedback for hundreds of different Java specification requests, as well as participate as a member of a Java Expert Group. JCP membership for organizations and commercial entities requires annual fees, but is free for individuals.
Thanks to the JCP, the Java language has been extensively revised to address all kinds of different programming problems. Case in point (see sidebar) is how a simple Java function to sum an array of integers has evolved over the last 20 years, through different Java language releases.
This coding example shows how the language has evolved over the years by tackling pain points that Java developers complained about through the JCP. In response to complaints about Java's verbosity, the latest version, Java 8, added features taken from functional programming idioms that make Java code shorter and more expressive. The Java 9 release, due in 2017, will introduce modularity to create a scalable and more secure platform. Beyond Java 9, the Valhalla and Panama releases, are designed to provide more efficient access to data and better control over data layout in computer memory to achieve higher performance, which are pain points that big data developers face.
While mainstream Java is managing the difficult task of evolving and remaining widely popular, Scala (No. 31) and Clojure (No. 50) are a couple of niche languages that warrant higher rankings than they currently have on the TIOBE index. Based on current scuttlebutt in the Java community, either or both of these languages have the potential to replace Java as the most popular programming language since this is where a lot of cutting edge innovation is happening. However, both Clojure and Scala use JVMs and can be considered part of the greater Java ecosystem. This means that your enterprise's investment in Java applications ought to be safe, at least for another decade or two.
How do you account for Java's ongoing popularity? Let us know.
The evolution of Java syntax
EXAMPLE OF JAVA CODE EVOLUTION:
SUMMING AN ARRAY OF INTEGERS
// Summing an array of ints
// Java 1
int result = 0;
For (int = 0; i<array.length;i++)
result += array[i];
System.out.println("Sum: " + result);
// Java 5: Use enhanced for-each loop
int result = 0;
for (inti : array)
result += i;
System.out.println("Sum: " + result);
// Java 8: Use streams library and parallel computation