Java News from Thursday, July 7, 2005

Oracle has submitted JSR 276, Design-Time Metadata for JavaServer Faces Components, to the Java Community Process. According to the JSR,

Design-time tools require both grammar and metadata information for Java Server Faces (JSF) components in order to provide a polished design-time experience. Grammar information, such as the set of available components and what properties exist on those components, is used by tools to guide the user towards valid editing operations. While grammar information can help the tool support the basic operations for creating and manipulating components, metadata can be used to enhance the design-time experience in a variety of ways. Design-time metadata is perfect for simple customizations like changing what name or icon a tool displays for a component, but it can also be used to arrange components or attributes into categories, or even provide information on common design patterns associated with a component.

Although the faces-config.xml language allows a component author to express a great deal of information about their components and renderers, it only has standard syntax for expressing a very minimal set of design-time metadata. In order to provide a polished design-time experience, tool vendors need more information. In the absence of a standard, tool vendors have started to invent proprietary mechanisms for supplying additional design-time metadata for JSF components. Unfortunately, that makes the job of the component author very difficult, if they plan to integrate with multiple tools. In addition, developers that use JSF technology have expressed their frustration and concern with not being able to choose their JSF tool independently from the component library that best meets their needs.

The hope is that through this JSR, the Java community can work together to define a standard solution to this problem. The Expert Group will consist of a representative set of tool vendors and component authors, and the feedback of the community will be actively solicited. The goal is to produce a specification that defines:

The resulting specification is intended to be compatible with both JSR 127 and JSR 252 without imposing any restrictions on JSF component authors.

In order to ensure that the design-time metadata can be consumed by a wide variety of existing and future JSF tools, it is anticipated that this JSR will not require tool vendors to implement any specific APIs. However, the extension mechanism mentioned above could be utilized to define additional metadata items that are tied to a specific API. For example, additional metadata items could be defined for associating the rich contextual property editors and customizers that are being developed in the Design-Time API for JavaBeans (JSR 273) with JSF components. The extension mechanism gives tool vendors the ability to change and innovate while still benefiting from a shared set of common metadata items and a standard mechanism for providing metadata.