Subscribe to our mailing list

* indicates required
Close

Tuesday, March 17, 2009

Java as Legacy Language

Bruce Eckel (Thinking in Java) has an interesting post on The Positive Legacy of C++ and Java. I'm a sucker for articles that talk about Java and C++ as legacy languages, and this one is notable not only for the fact that it comes from a true authority (Eckel was on the C++ Standards Committee for 8 years, and saw the language design decisions take place first-hand) but for the 70-odd comments (mostly lengthy, mostly astute and non-emotional) that his post provoked.

Eckel's post is akin to a very short eulogy. I wish it had been much longer. But the fact is, Eckel has written numerous article, books, and blogs over the past five or six years outlining the weaknesses (large and small) of Java and C++, so it's not hard to find more to read on this subject.

Java is far from dead, of course. Much like COBOL, it will live on and on, eventually becoming something of an arcane specialty language mostly taught in universities.

What were (are) some of Java's biggest failings? Maybe it's more important (and constructive) to ask what its biggest successes were. To me, Java's major disruptive effect (when it arrived in the mid-1990s) was and is due to its game-changing notion of running on a virtualized machine. The idea of cleanly separating a language from underlying machine dependencies was a huge advance. In sum, the importance of Java is that it was/is not just a language but a platform.

A second pivotally important aspect of Java is that by its very design, it facilitated programming-in-the-large. The package mechanism, the orientation toward safe reuse, and the assurance of a common, stable, secure, platform-independent process space in which to run (the JVM), allowed teams of programmers to work independently to produce large applications that could take advantage of the huge advances in machine design (per Moore's Law) that occurred throughout the 1990s (without which, frankly, Java would have failed to be anything but a curiosity).

By supporting programming-in-the-large, Java made possible the huge middleware industry we see around us today. Certainly we would have had a middleware industry without Java, but it would have looked much different and come with a much different set of problems. (It would have had even more of a Rube Goldbergish quality to it than it has now.) Java popularized the notion of an application server, which by itself was a landmark development that changed the software industry.

Another outcome of Java (and C++): The notion of design patterns. The very complexity of the large systems made possible by Java and C++ demanded a new type of "best practices" knowledge around the construction of "orchestrated systems" (tm).

We owe a lot to Java, clearly, but the sheer cost of using Java for smaller-scale projects is driving the creation of new, lighter-weight languages and frameworks that offer a better impedance match with agile working styles. Going forward, it simply won't be economical to use Java for most kinds of development.

The industry hasn't quite figured out yet what the best technologies are for replacing Java in various types of development, but that's what makes things so interesting right now. Economic downturns like the one we're in tend to drive intense competition, and intense competition breeds innovation. Hence, whatever the next Big Disruption in programming turns out to be, it will probably come sooner rather than later.

One thing is for sure: If you're in the software development business, don't cling to old ways of doing development. And also, don't get too carried away thinking that something like Scrum is going to be the Bandaid that fixes your agility problems, because it may turn out that your main problem is Java itself. Keep an open mind. Try new things. Be ready when the next disruption arrives, or you may find yourself without a chair when the music stops.

14 comments:

  1. I'm currently learning java as a major part of my university course funnily enough. After using it for about 6 months, I've come to the conclusion it is a good teaching language, however, as you say it is very slow and heavy. I look forward to learning other more light weight languages in the very near future, using the grounding I have gained from java.

    ReplyDelete
  2. Nice (very objective) post.

    ReplyDelete
  3. Wow. I didn't expect this from you. LOL. Glad to see you're as open-minded as you are intelligent.

    For me, it was Javascript. I spent decades of believing that OO had a strict and narrow path -- and that Java was the answer to our OO salvation. Then on an exciting and important project, I was forced to learn prototype.js, a leading Javascript lib. Big eye opener.

    I am not saying that Javascript is the perfect language. It's far from it. However, it's precisely the things that make it so un-Java-like that make it so awesome.

    There's a painful learning curve when going from Java to Javascript. For this reason, I take great pleasure in poking fun at Java developers trying to write Javascript. (And I have lots of experience fixing their failed Javascript attempts, too.)

    Some of them eventually "get it". These are the truly smart ones. The ones that are ready to embrace the future.

    Java's not going away any time soon. And who knows what the future looks like. I just know I am ready for it.

    Thanks Brendan Eich for lifting me out of stagnation!

    ReplyDelete
  4. It's been 3 years, i am working as java professional and honestly, java sucks when it comes to small scale projects. the time you spend on configuring and making things ready is almost equal to the time other language take to make a simple CRUD application.

    On the other hand, i don't think that JAVA should be the choice for "academic".

    ReplyDelete
  5. It's been 3 years, i am working as java professional and honestly, java sucks when it comes to small scale projects. the time you spend on configuring and making things ready is almost equal to the time other language take to make a simple CRUD application.

    On the other hand, i don't think that JAVA should be the choice for "academic".

    ReplyDelete
  6. I am sorry, the cost curve you speak of for small projects is non existent. It really annoys me to see these post calling Java a legacy language, and that its time has come. We have head these "the sky is falling" predictions for years, and every year Java becomes more entrenched. To the other commenters, you are doing it wrong. Java has been shown time and time again to be as fast or faster than the most of the languages one the block. Also, anyone who has been on the block for more than a few weeks knows there is a wide assortment of "get up and go" frame works from Wicket, to JSF, to Seam that can get you from nothing to a CRUD app in hours. Too many people use Java poorly and blame the language. It is not the screw's fault that you are trying to hammer it in.

    ReplyDelete
  7. I'm with Jim on this one. Java is becoming richer and more open every year that goes by. With the advent of Spring, and SUN's more recent work on POJO-based enterprise development, it has never been more easy to produce highly fault-tolerant, scalable applications in a very short period of time. Let's not forget about the rich Scripting API that is now bundled with JDK6, which embraces the less is more paradigm.

    The language, platform and open tools ( from Eclipse to NetBeans to everything from the Apache Foundation ) have pretty much everything anyone could ever imagine or need. The entire platform, however, can be daunting because of it's sheer breadth.

    In short, as long as SUN, IBM, Oracle and the Open Source Community continue to evolve the language, tools and platform, it should be considered more of a giant utility belt that can address any project scope.

    ReplyDelete
  8. It's may not be the screw's fault that you're trying to hammer it in. But if you've already got a hammer, then sometimes you need to throw the screw away and use a nail, instead.

    ReplyDelete
  9. To me, Java's major disruptive effect (when it arrived in the mid-1990s) was and is due to its game-changing notion of running on a virtualized machine. The idea of cleanly separating a language from underlying machine dependencies was a huge advance.

    A huge advance in the 60s, maybe. 90s? Old news.

    ReplyDelete
  10. Jim,

    You illuminate the point. Using rails/django/catalist in ruby/python/perl you can have a useful CRUD app in minutes to an hour or two. I do it all the time. This includes installing the environment.

    Adding custom workflow, background processes, is only hours on top of that.

    It took me 5 hours total to develop, test, and deploy into production the redirect tracking system for managing podcast advertisments for audible.com. This includes the redirection server software, and the administration interface to manage, track, and report on events. This was mod_perl and catalyst which would have taken probably half the time to do in rails (mod_perl is faster than ruby so I took this route).

    Java and J2EE are nightmares, especially for web apps. Even Spring/Hibernate don't ameliorate it. Java is not good for web apps period, nor good for transactional systems (garbage collection stalls are just one reason why).

    ReplyDelete
  11. I think Java is a legacy language but that doesn't mean that it, like other languages, doesn't have frameworks that, once downloaded can have you going in minutes. Wicket, Play!, Struts2 and of course AppFuse - all of these will give you a CRUD app in the same amount of time it takes in Ruby or Python using Rails or Django.

    The introduction of Java frameworks like Play! and of course tools like JRuby are an excellent way for developers to introduce a new, faster, more agile style of development, with a smaller startup cost, into a company committed to a core set of technologies.

    ReplyDelete
  12. If Java is legacy as a production language, then I don't see its point as an academic language too. C++ prepares you for more academically. The chief reason for Java's emergence as an academic language was its industrial popularity, which seems to be waning now.

    ReplyDelete
  13. I recently came accross your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.


    Miriam

    http://www.craigslistposter.info

    ReplyDelete
  14. Anonymous3:50 PM

    The major change about programming is already happening with professional and mature MDA solutions. It is now possible to generate top quality code from modeling languages, the same models can be generated to any number of different architectures (menaning languages, but framework , design pattenr, execution server ...).
    Mature tools exist, which allow users to focus on the design of the software they want to produce and then generate on the most suitable target architecture, based on performance, richness of UI ....
    All majors (IBM, Microsoft ...) and top innovative solutions (Blu Age, eclipse commnity) all go that direction with proven results.

    Languages won't get obsolete or legacy, they will be used based on what they provide to companies: cost for execution, TCO, efficiency, scalability ....

    Xal

    ReplyDelete

Add a comment.

Note: Only a member of this blog may post a comment.