Skip to main content

skip to main content

developerWorks  >  Java technology  >

JavaOne 2003: Java roadmap (Technical keynote)

Graham Hamilton and Tim Lindholm offer Sun's vision for the Java platform

developerWorks
Document options

Document options requiring JavaScript are not displayed


Rate this page

Help us improve this content


Level: Introductory

Brian Goetz (brian@quiotix.com), Principal consultant, Quiotix Corp

17 Jun 2003

As with past JavaOne conferences, the opening keynote looked at the current state of Java technology and presented a roadmap for where it is going in the next year. This year, Sun VP Graham Hamilton and CTO Timothy Lindholm offered some notable changes in direction and focus for Java technology over the next twelve to eighteen months.

At this year's JavaOne conference, the keynote sessions were renamed to "General sessions," and were divided into general and technical categories. Whatever you call them, they still had the same purpose -- to present Sun's vision of the present and future of Java technology to conference attendees.

In the opening technical session, Sun VP Graham Hamilton and CTO Tim Lindholm presented a roadmap for Java technology over the next year, and offered some notable changes in direction and focus for version 1.5, the next major version of the J2SE and J2EE platforms.

Many attendees were surprised at the scheduled release dates for J2SE 1.5 (Tiger): the current projected release date is over a year out, and the J2EE 1.5 release is even farther, with no date set. Hamilton hinted at the explanation for this -- that more time was being allowed for testing to improve the quality of the initial 1.5 release. In the past, Sun has been embarrassed by the number of bugs in the 1.4 JDK release; 1.4.1 and 1.4.2 each contained over 2000 bug fixes.

Platform directions

Hamilton suggested a shift in development priority for the upcoming releases, reducing investment in new features and performance and increasing investment in ease of development and stability. While features are still important -- and Tiger contains several interesting new language features -- the suggestion was that the Java platform has reached a level of maturity where the relative importance of new features has lessened. Similarly, while performance is still important, Hamilton suggested that Java performance, especially with the performance improvements in 1.4.1 and 1.4.2, had become "good enough," and that development resources were being shifted to other goals, such as stability and quality.

Additional reports from JavaOne 2003



Back to top


Ease of development

The surprising new priority laid out in the keynote for J2SE and J2EE 1.5 was "ease of development." While Java technology has been very successful in the enterprise space and is gaining ground in the device space, it still lags in departmental applications, an area currently dominated by Visual Basic and C#. While the Java platform is widely perceived as powerful and stable, it is also perceived as hard to learn, an impediment, Sun believes, to Java technology gaining a strong foothold in a large and commercially important market. Another surprising new focus for 1.5 is to improve the platform's integration with scripting languages.



Back to top


J2SE 1.5 -- Tiger

Tiger is the first release of the Java platform since 1.1 to contain major new language features, including generics (sometimes referred to as templates), enumerations, autoboxing, a new for-loop format, formatted I/O (printf and scanf), and a new code metadata facility.

Generics, which have been in the pipeline for nearly four years and were originally targeted for J2SE 1.4, extend the type-safety of Java programs by enabling the compiler to enforce type constraints on objects placed in collections. They also simplify code by eliminating the need to cast items retrieved from collections. Declaring the type of objects that a collection holds also makes the code easier for readers to follow. See Resources below for links to more information on generics.

The new for-loop format, sometimes called for-each, is a syntactic simplification that lets you eliminate the mechanics of managing loop variables or iterators from your code when iterating over arrays or collections. The result is less code and the elimination of a common source of errors when writing nested loops. Listing 1 shows the for-each loop for iterating over an array and a collection; in each case, the loop variable test condition and update expression is generated by the compiler, as if the programmer had coded it the usual way.


Listing 1. New for-loop to iterate arrays and collections
  String[] strings;
  List<Foo> list;
  ...
  for (String s : strings) { 
    doSomething(s);
  }
  ...
  for (Foo f : list) {
    doSomething(f);
  }

Enumerations should be well known to C programmers, and the new enumeration facility allows you to define type-safe enumerations you can use as labels in switch statements and iterate over safely without the "brittle client" problem that occurs when you try to implement enumerations with integer constants. A feature borrowed from C#, autoboxing allows transparent conversion between primitive types, such as int, and their wrapper object types, such as Integer.



Back to top


Metadata

The introduction of a metadata facility in the Java compiler is a significant and far-reaching development. The metadata facility enables developers to create new attributes for classes, methods, and fields, similar to custom Javadoc tags. The compiler places these metadata attributes into the class file, from where extensions to reflection allow programs and tools to fetch metadata.

Metadata serves two purposes: it allows the developer to document assumptions or attributes of the code, and it allows tools to retrieve this information. For example, you could create an @overrides attribute for methods, which would indicate that this method is overriding a method in a superclass -- very useful for documentation purposes. In addition, a tool run after compilation could examine this tag and verify that the method does indeed override a superclass method, or flag it as an error if it does not. Here's an example:

  public @overrides void someMethod(String foo) {
    ...
  }

Metadata can also be used by tools to generate code or support files, a feature heavily used in J2EE 1.5. Metadata tags embedded in EJB and servlet classes can be used to generate default deployment descriptors for those components, simplifying development. (This application of metadata is similar to what can be done with the XDoclet tool, which uses custom JavaDoc tools to generate code and deployment descriptors.)



Back to top


J2EE 1.5

Though it does not yet have a release date, the major theme for J2EE 1.5 is ease of development. The Tiger metadata facility is being used heavily throughout J2EE 1.5 to simplify the development of J2EE components. The creation of deployment descriptors is a significant complication when building J2EE components, and one of the goals of J2EE 1.5 is to free developers from writing deployment descriptors. This goal is being accomplished by using special metadata tags in the component source code, and by providing defaults for more deployment options. The development tools will generate a default deployment descriptor, which deployers can then modify.

J2EE 1.5 will also include new versions of the JavaServer Faces toolkit for building sophisticated GUIs for Web applications, along with new versions of the EJB (3.0), JDBC (4.0), JAXB (2.0), and JAX-RPC (2.0) APIs. Each of these specifications includes features to simplify development compared to previous versions. JAX-RPC 2.0 will use metadata to tag Web service methods with the @remote tag, which the WSDL generator will use when generating the WSDL file. In EJB 3.0 you will be able to define simple EJB components with a single class file, instead of requiring several interfaces, a class, and a deployment descriptor.



Back to top


Scripting

A final goal for J2SE 1.5 is to improve the relationship between Java classes and scripting languages. JSR 223, which will define a framework for scripting in the Web tier, will enable components to expose objects and properties in a controlled way to scripting languages.



Resources



About the author

Brian Goetz has been a professional software developer for the past 15 years. He is a Principal consultant at Quiotix, a software development and consulting firm located in Los Altos, California. See Brian's published and upcoming articles in popular industry publications.




Rate this page


Please take a moment to complete this form to help us better serve you.



YesNoDon't know
 


 


12345
Not
useful
Extremely
useful
 


Back to top