News

Java team's 'obsession' aims at simplifying development

The big brains on the Java team at Sun Microsystems have what Graham Hamilton, Sun's vice president and fellow for Java platform and architecture, calls "a secret obsession."

"The Java developer base is large, and we're happy about that, but we want to grow that base even more," he says. "To do that, we believe that we have to simplify development to make it easier for all developers to write large, rich applications."

The Java team took a significant step in that direction with what some regard as the most significant new feature of the recently released Java 2 Standard Edition 5.0 (code named "Tiger"). Called "annotations," the new feature brings a metadata facility to the core Java language.

"We see annotations as a technology that will make things like EJB much more accessible to a much wider audience," he says. "It's the single most important feature of J2SE 5.0."

Metadata can be used to create documentation, to track down dependencies in code, and even to perform rudimentary compile-time checking.

Annotations is the metadata facility that has become a part of the Java language with the Tiger release. Annotations are modifiers that can be added to code and applied to package declarations, type declarations, constructors, methods, fields, parameters, and variables, explains Gilad Bracha, Sun lead architect and "secret mastermind" behind the recent changes in J2SE. Bracha was the spec lead for Java Specification Request (JSR) 175, known as "A Metadata Facility for the Java Programming Language," which led to the development of annotations.

J2SE 5.0 includes built-in annotations and also supports custom annotations developers can write themselves, Bracha says. The feature allows classes, interfaces, fields, and methods to be marked as having particular attributes.

Annotations actually evolved out of programming practices that were, to a large extent, already in place, says Graham.

"When we began planning for Tiger, we started thinking about what we could change in the Java language that would really help developers in big ways," he says. "When we stepped back and looked at what programmers were actually doing, we found that they were marking things as having special attributes, and then our tools were doing work for them based on those attributes.

The official story is that [Java] is an object oriented programming language; you've got objects and you've got methods. But here was this declarative style of programming Java. Developers were finding ways of marking things. We found a way to make that a part of the Java language."

Officially launched in October, J2SE 5.0 is a set of specifications used primarily to develop Java applications for desktop computers. It is the technology underlying the Sun Java Enterprise System, the Sun Java Studio Enterprise tools, and the Sun Java Desktop System offerings. Version 5.0 comes with significant architectural changes and an up-to-date GUI for a new, "more modern" default look and feel for Java apps.

The JCP is already working on the next upgrade, J2SE 6.0, codenamed "Project Mustang," Graham says. That release is expected sometime in 2006. The next version of Java 2 Enterprise Edition, Version 5, is expected in early 2006, and the Sun Java team is working on a common set of annotations for that platform. Annotations functionality is also expected to be added eventually to Sun's Java Studio Creator tool.

About the Author

John K. Waters is a freelance writer based in Silicon Valley. He can be reached at [email protected].