W3C Workshop on
Device Independent Authoring Techniques

Developing Device Independent
Java Applications with JSR 188

Luu Tran
Sun Microsystems, Inc.


The Java Community ProcessSM (JCP) [1] is the way the Java platform evolves.  Java Specification Request (JSR) 188 [2] was recently submitted to the JCP [1] to enable interoperability between web servers and access mechanisms, and to facilitate development of device independent web applications.  The World Wide Web Consortium (W3C) [3] defines a standard known as Composite Capabilities/Preferences Profile (CC/PP) [4] to describe device capabilities and user preferences that can be used to guide the adaptation of content presented to that device.  JSR 188 [2] will define a set of APIs for accessing CC/PP [4] information.  This information can be used by developers to build device independent web applications or web content adaptation systems.

Device Independence

The W3C [3] document Device Independence Principles [5] describes device independence as content and applications authored, generated or adapted for a better user experience when interacting with presentations via many different access mechanisms.  An access mechanism is a combination of hardware (including one or more devices and network connections) and software (including one or more user agents) that allows a user to perceive and interact with the Web using one or more interaction modalities (sight, sound, keyboard, voice etc.).  The general phrase "device independence" is used for this, although the access mechanisms may include a diversity of devices, user agents, channels, modalities, formats etc.

Delivery Context

The Device Independence Principles [5] document also defines delivery context as a set of attributes that characterizes the capabilities of the access mechanism and the preferences of the user.  Web servers and applications that hope to achieve device independence must be sensitive to delivery context.

Composite Capability/Preference Profiles (CC/PP) [4] has been established as the industry standard for describing delivery context. The Open Mobile Alliance (OMA) [6] defines a standard known as User Agent Profile (UAProf) [7] which is based on CC/PP [4] and has been embraced by the WAP community including gateway vendors and handset manufacturers who have embedded UAProf [7] into their products.

JSR 188

JSR 188 [2] will provide the Java community with a standard set of APIs for accessing delivery context information that is compatible with the vast majority of web access mechanisms that participate in delivery context negotiation. This will allow Java developers to write device independent code that can deliver content to a multitude of web access mechanisms while reducing development costs, and will help to avoid a proliferation of proprietary and potentially incompatible implementations.

Web servers and applications will be able to use this API to optimally adapt content for individual access mechanisms. J2EETM Client Provisioning servers will be able to use this API to help determine the appropriate client application to provision. Portal servers will be able to use this API to adapt content and pass on delivery context information to portlets that would adapt their behavior accordingly.

Every device independent application will need access to delivery context information.  One of the goals of JSR 188 [2] is to make this as easy as possible for the application developer.  The complexities of the transfer, representation, and resolution of delivery context information is hidden from developers.  They can depend on any JSR 188 [2] compliant implementation to provide requested profile attribute values in a convenient and standard way.  Use of the JSR 188 [2] API will eventually become the preferred authoring technique for developing Java code for device independent web applications.

JSR 188 [2] is currently in the early stages of the JCP [1].  The expert group is collecting requirements and refining the scope of the specification and API.  The expert group is very interested in considering current Java related authoring techniques to ensure that the API meets the needs of developers writing device independent Java code.


[1] JCP: "The Java Community Process(SM) Program", http://www.jcp.org/
[2] JCP: "JSR 188 CC/PP Processing", http://www.jcp.org/jsr/detail/188.jsp
[3] W3C: "The World Wide Web Consortium", http://www.w3.org/
[4] W3C: "Composite Capabilities/Preferences Profile Working Group", http://www.w3.org/Mobile/CCPP/
[5] W3C: "Device Independence Principles",  http://www.w3.org/TR/2001/WD-di-princ-20010918/
[6] OMA: "Open Mobile Alliance", http://www.openmobilealliance.org/
[7] OMA: "User Agent Profile (UAProf)", http://www1.wapforum.org/tech/documents/WAP-248-UAProf-20011020-a.pdf