Is Java Obsolete?

Programming languages seem to follow a cycle in which they become widely used, then fall into disfavor and eventually become “legacy” technology. COBOL, anyone? Java is a programming language that was widely considered revolutionary when it was first released. Its promise of write once, run anywhere offered to change the way computer applications were developed. Java has enjoyed a great deal of adoption but as the world increasingly moves towards web based applications, has Java’s fifteen minutes of fame elapsed? Is Java obsolete?

One feature of the Java programming language is that it enforces object-oriented design. Object-oriented design was created largely to address the complexity of maintaining large software systems. By creating abstract models of the various parts of the system, complexity could be reduced and it was believed that more code could be reused. While the reuse goals of object-oriented design have not always been realized, the simplification of maintenance has been. Java requires the use of object oriented design. In fact, some detractors see this as a problem. Java has no way to write strictly procedural code like you might write in a small script. This is less of a problem than many realize. By enforcing object-oriented principles, Java actually encourages developers to spend more time thinking out the design of their systems and this leads to code that is more easily maintained.

The object-oriented nature of Java also makes it ideal for programming using design patterns. Design patterns are simply object-oriented designs that have been tested and that encapsulate frequently encountered design problems. One example of a design pattern is the familiar web development pattern of Model-View-Controller (MVC). Java’s object-oriented nature makes it an excellent language to learn and use design patterns. Using these patterns also leads to better code.

Java’s initial promise of write once, run anywhere continues to be true today. Java is compiled into byte code which is then executed by a virtual machine. As a result, Java software is very portable. It is almost trivial to port a Java system to a new platform. This makes it an ideal platform for writing software for diverse hardware and operating system platforms. Incidentally, diverse hardware and operating systems perfectly describes the lay of the land in the rapidly growing mobile device space. If any revolution in the computing world helped to ensure that Java stays relevant, it would be the burgeoning mobile space.

Finally, Sun’s move to make Java open source means that its future is no longer tied to the rise and fall of any one company. By making Java open source, Sun ensured that virtual machines for running Java byte code could and would exist for any new platform. This further adds to Java’s relevance as it will likely be available on whatever new platforms emerge in the near future. By developing in Java, application developers can future proof their applications. They know that it will be trivial to port them to whatever the next great operating system or hardware platform is.

While desktop applications are no longer king, Java is still quite relevant because of its promise of write once, run anywhere. This ability to code applications and expect them to work on any platform that supports Java makes it an ideal development language for the rapidly growing mobile device market. With its other strengths, the mobile market alone should ensure that Java remains relevant for many years.