HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

J2SE is going through a bit of an overhaul at the moment, with the release of J2SDK 1.5 (project name "Tiger") due at the end of 2003. Sun Microsystems ran a feature article in May about this release that included a Q&A with Joshua Bloch, a senior staff engineer at Sun (http://java.sun.com/features/2003/05/bloch_qa.html). 1.5 contains enhancements that enable developers to create simple robust code. The impact on legacy code has been kept to a minimum. Well, I hope so; at least that's the way I read it.

I use Generics on a daily basis and find it an interesting issue, especially when dealing with RSS/RDF data items (and trust me I see a lot of RSS data).

  • Old style:

    List myList = new ArrayList();

  • New style:

    List myList<String> = new ArrayList<String>();

    Now is that funky or what? Do you see the benefits? First, it solves most of those annoying casting problems; no longer do we mere mortals have to suffer typing:

    Iterator i = myList.iterator();
    while(i.hasNext(){
    String thing = (String)myList.next();
    }

    Now we can save ourselves from typing eight characters. Which, from my point of view, is 80 characters a day, multiply that by a year (I work hard), that's 29,200 typing actions saved. Depending on your half-empty/half-full perspectives, you could either be keeping RSI at bay or losing on productivity.

    With Generics in 1.5 the errors are caught at compile time, not at runtime. In theory most of the ClassCastExceptions will be eliminated. Sounds like a good deal to me. The jury is still out on whether anyone will go back and change every casting from a collection, but that remains to be seen.

    I won't go into the enhanced for loop, autoboxing, or avoiding the creation of boilerplate coding with metadata. The best thing you can do is read Sun's J2SE 1.5 article, while I readjust my cynicism chip to full.

    Here we go: Will the 1.5 SDK be available across all OS types? Now I use Windows, Debian Linux, and FreeBSD in a commercial setting so I need a stable SDK across all of these. As for the rest of the world, there's still all the other Linux releases, Solaris (I think Sun will have that one covered), and Mac OS X. I'm always wary of new SDK releases as they take time to be accepted, and then you have to think about the developer catch up. Is everyone now using NIO and Regular Expressions these days? I don't think so, judging by the amount of queries I see in mailing lists and other developer/student help channels.

    Developer releases are great - they evolve, invigorate, and charge the head, the hands, and the heart to code like you've never coded before. The question you have to ask is: "Is this release really going to impact the business that I work in?" How is it going to increase productivity? How much retraining will be required? How many more books will I have to buy on the Java language? The ultimate question is: What is the cost benefit?

    J2SE 1.5 could be a sleeping Tiger for a good 12 months unless the hearts and minds of Java programmers are refreshed in the things they do. I'm excited about it, but other developers don't always think the same way I do. Sun needs to work hard at serving the community across operating systems. Now I can appreciate that there are always manpower constraints, but a proper roll out has to be maintained. I want to use 1.5 across the OSs I use, but may not be able to do so for a little while yet.

    About The Author
    Jason Bell is the senior programmer for a B2B portal. He's also a keen supporter of people reading the API docs before asking questions. In his spare time he's involved with building RSS development tools. [email protected]

    All Rights Reserved
    Copyright ©  2004 SYS-CON Media, Inc.
      E-mail: [email protected]

    Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.