Blog Article
Why Java Still Matters
James Burt - Senior Java Developer
2022 Oct 20 - 1min. Read
Share
Copy Page Url
Why Java Still Matters by James Burt, Senior Backend Developer
Java is now over a quarter of a century old. It emerged on a wave of hype in 1996, promising to be a programming language for the Internet. But, unfortunately, it very soon came to feel awkward and was mocked as a boring, corporate language. Ten years later, people were writing book-length obituaries for Java, suggesting that developers move on.
Somehow, at the start of the 20s, Java is still going strong. The Stack Overflow developer survey lists it as the third most popular computer language behind Javascript and Python. After some rocky times, Java is probably better off in terms of position and community than it has ever been. It's worth looking a little into Java's history to see why this is - and what the future looks like for the language.
A Very Brief History of Java
1996 seems like a long time ago. Java emerged just as the Internet was entering popular consciousness. You'd still get people arguing that the online world was a fad, but it was becoming increasingly important.
Java contained some bold ideas:
- It used a virtual machine implemented for multiple computer architectures, meaning the same program could (in theory) run anywhere.
- It provided applets, which allowed code to run on a web browser.
- It built on the lessons of C++, removing some of the complexity and danger of that language. Notably releasing the need for memory management.
The language soon ran into trouble. The promise that it could run anywhere turned out to be less reliable than hoped. The wordiness of the language frustrated some developers, producing stodgy source code compared to languages like Python and Perl. On top of that, there were some horrible implementations of enterprise Java, which led to many projects producing bloatware.
By this point, Java was being mocked as a modern version of COBOL, the business oriented-language produced in 1959. This was not an entirely unfair comparison, given the code many developers were encountering.
In the mid-noughties, it seemed evident that Java was coming to the end of the line. Bruce A. Tate wrote a book, Beyond Java, about how Java was doomed. This was the time of AJAX and Web 2.0. Java did not seem cut out for the web environment, and handling XML configuration with clunky text processing was frustrating. In addition, Java was not well-set for its regular use as a middle-tier of a three-tier architecture. Compared to PHP, Java felt frustrating and unwieldy.
There were several competitors for Java's place. Ruby and Python were becoming more popular. Microsoft's .net was very similar to Java - to an almost legally actionable level - but had the second-mover advantage of removing some of Java's significant flaws. The feeling was that dynamically typed languages produced better, faster code.
Java’s renaissance
Many things helped Java through this challenging stage; One was its use as the initial programming language for the Android platform. The JVM meant that other languages, such as Clojure and Scala, could use the Java platform - and indeed, 2011 saw the emergence of another JVM language, Kotlin, which eventually supplanted Java as the primary language on Android.
Java was fortunate to have a large community of open-source developers, and Spring emerged from this. The early versions of Spring were horrible, with applications being plumbed together through arcane XML configurations. The slightest error would result in pages of unreadable error messages. But later versions of Spring made good use of Java annotations (which first appeared in Java 5). This forced JavaEE to follow some of these developer-friendly innovations.
The language has continued to improve, with Java 8 introducing some functional paradigms. While this is not unproblematic - there were advantages to Java's simplicity - it has eased some complaints about the language. On top of this, Oracle proved to be a good steward for Java, moving to a six-monthly release schedule. As a result, in the past years had sometimes gone by between different versions of Java.
Java has carved out a good space for itself, particularly in cloud computing and microservices. It's seen off some of the rivals. Notably, dynamic languages are much less fashionable, with many developers moving from Javascript to Typescript – a more formal implementation of Javascript.
The Future?
Looking back on my career, learning Java in 1999 was a good decision. It's led to me working on some fascinating projects on both backend servers and mobile. But, if I was starting out in programming now, would I still choose Java as my first language?
For beginners, I can see a lot of attractions for learning Javascript, which is more flexible, has better multimedia capabilities and is easier to get running. However, there is an important place for Java in collaborative projects. While its ecosystem can be forbidding to newcomers, it enables people to work together on massive codebases. The projects I am working on now are incredibly sophisticated compared to what we built in 2000.
Other languages are 'objectively' better than Java. For example, on the JVM, we have the fearsome power of Scala and the developer-focused features of Kotlin. But I think Java's relative lack of sophistication forces developers to produce more straightforward code. It is essential in our remote working future – we write code for other developers, not the machine.
Share
Copy Page Url