The date May 23rd marked 20 years since the Java programming language made its humble launch following a four-year development effort. In that time, the language gas grown, imploded, been declared dead almost as many times as the mainframe. It is now enjoying a renaissance under Oracle's stewardship.
Googling "Java is dead" brings back millions of results, although there are almost as many people refuting it as declaring it. In the last few years, Oracle has put a lot of resources behind the language to help close all the zero-day exploits and harden the language.
Even when things were bad, Java still had its adherents and supporters who used it for major projects because it had scale and the ability to modularize and break up functions rather than create a monolithic app. This modularity will only improve when Oracle releases Java 9 next year, as it will be a highly-modularized release that loads only the components you need.
Another point in Java's favor is that it is widely used. In some cases, that was the reason for its use in a project. The developer knew Java but didn't know other languages. Or they wanted the cross-platform functionality only Java has. Every developer has their reason, but one thing remains consistent: even at its nadir, when the Department of Homeland Security advised Americans not to use the language, Java remained powerful and used in many consumer and enterprise applications.
Below are some of the major apps you may not realize were actually written in Java, but you will see that they are and the reasoning for choosing it from the developers. This is far from a complete list, but it does cover a lot of products, including ones you might use every day.
While many of the projects listed below use a mixture of languages, in the case of Hadoop, the whole thing is written in Java. Doug Cutting, creator of Apache Hadoop and former chairman of The Apache Software Foundation, said this via e-mail:
"Java offers a good compromise between developer productivity and runtime performance. Developers benefit from a simple, powerful, type-safe language with a wide range of high quality libraries. Performance is generally good enough. When it falls short, native code has been used to keep overall performance in line with C and C++.
"Some hate Java and complain that another language would have been a better choice, but every language has its detractors. The fact that Hadoop has been widely adopted shows that Java was a reasonable choice."
Not only is Hadoop written in Java, so is MapReduce.
Twitter started out as a Ruby on Rails application and was the poster child for what RoR could do. Unfortunately, it soon became the poster child for what RoR couldn't do, and that's scale. It's not that Rails doesn't scale by itself, but it doesn't handle requests for live data, like searching by hashtags, very well.
The result was a growing number of instances where we saw the "Fail Whale," an error page that said the service was overloaded. In 2010, Twitter began a major overhaul of its systems. It changed its back-end from MySQL to a real-time version of Lucene and switched from Rails to Java server it calls Blender.
The move to a JVM was driven by both performance needs and developer needs, the company told InfoQ. "The primary driver is honestly encapsulation, so we can iterate faster as a company. Having a single, monolithic application codebase is not amenable to quick movement on a per-team basis."
The Squarecredit card reader for smartphones and tablet-based point of sale system is a mishmash of languages, using the appropriate language at the place it is needed. That includes Ruby, C++ and Objective-C. The payment stack, which is the important part, uses Java and the third-party API layer uses JRuby and Node.js.
Bob Lee, chief technology officer at Square and a former engineer at Google, told Wired in 2013"Java is really the only choice when it comes to the requirements for a company like ours -- extreme performance requirements and extreme scalability requirements. There is no viable alternative."
Netflix has transitioned from sending DVDs in the mail to consumers to offering on-demand streaming video via TVs, DVD players, game consoles and media boxes like Roku. That means a back-end architecture to handle it all. Netflix handles 2 billion content requests per day with Java-driven architecture.
“The vast majority of the services running within our architecture are built on Java and the Java Virtual Machine [JVM]," Netflix delivery engineering manager Andrew Glover told Silvae Technologies, a European development consultancy. "We have thousands of Java processes running all the time, yet as we grow we don’t have huge infrastructure challenges. We also have a lot of open source tools that are Java-based, which makes it easy to monitor, upgrade, and scale our services."
To do advanced deep space exploration and experiments, NASA needs advanced computing capabilities, IT systems like Conjunction Assessment Risk Analysis (CARA), Space Surveillance Performance Analysis Team (SSPAT), the Deep Space Climate Observatory satellite (DSCOVR), and the Flight Dynamics Facility (FDF) are all powered by Java.
"Java is the glue that ties our legacy software capabilities together, and provides a cross-platform modular framework for a collection of unrelated tools and capabilities via the NetBeans platform," a NASA developer only identified by his first name, Nick, told the developer publication JAXenter.
"Java enables me to deliver solutions that are cross-platform, performant and intuitive all at a low cost for the software development life cycle. Like Nick said, the Java ecosystem makes integrating the existing legacy tools straight forward, while JavaFX and the NetBeans Platform allow for modern reusable attractive interfaces," said developer Sean P.
Oracle has two Fusion product lines, enterprise applications and middleware. The middleware is a Java framework called Application Development Framework (ADF), which has a lot of design patterns and automates a lot of processes involved in application development. The apps include CRM, financials, compliance, HR, procurement, project portfolio management and SCM.
The apps were written in ubiquitous Javarather than a proprietary coding language to allow organizations to "tap into existing in-house technical skills rather than seek expensive outside specialists." Using Java and SOA, they have industry standard interfaces rather than proprietary ones.
While your standard Web server services up either static or dynamic HTML Web pages, Tomcat is specifically designed from the ground-up to serve as a Java Servlet engine. It uses the Java Servlet API to execute Java servlets for building dynamic websites. Since its mission is Java servlets, it made sense to write the whole thing in Java. Geronimo is a more enterprise-oriented platform
David Jencks, Project Management Committee (PMC) member for Apache Geronimo, said Java was the only option at the time the project started. "Scala might be a plausible alternative to Java itself, but it had not been invented when either project was started, and choosing Scala over Java would likely reduce the pool of potential contributors by at least 99%. Similar considerations apply to other JVM-based languages," he said via email.
Mark Thomas, PMC member for Apache Tomcat, said, "I agree that for both Tomcat and Geronimo Java was (and still is) the only choice. More generally, it has been my experience that familiarity of the developers with the language concerned is a much greater factor in the success of a project than the actual language. I have seen plenty of projects struggle because of a decision to implement it using a 'better' language and/or technology stack that the development team was unfamiliar with."
If you are not familiar with the game Minecraft and have a son between the ages of 10 and 15, ask him. Essentially the creation of one developer, Markus "Notch" Persson, Minecraft is a 3D world where players can create their own world out of textured blocks and make modifications for adventure, exploring and even playing against other players.
Notch wrote the whole thing in Java and the game is modifiable by players, so they can write Java code to create their own unique play landscape for others. The result is kids are learning to make mods and there are Minecraft workshops where 10 to 14 year old kids gather to learn Java coding, to the amazement of one Oracle developer whose kid attended a workshop.
Notch has said many times at game development conferences he went with Java because he knew it and others knew it, so mods were easy to make. He told a Game Developer Conference panel it was the language he "was most productive at."
Photo courtesy of Shutterstock.