Device Description Repository API 1b

Editors' Draft 31 August 2007

This version:
http://www.w3.org/2005/MWI/DDWG/drafts/api/070831
Latest version:
http://www.w3.org/2005/MWI/DDWG/drafts/api/latest
Previous version:
http://www.w3.org/2005/MWI/DDWG/drafts/api/070806
Editors:
Jo Rabin, dotMobi (mTLD Top Level Domain)
José Manuel Cantera Fonseca, Telefónica I+D
Rotan Hanrahan, MobileAware
Ignacio Marín, Fundación CTIC

Abstract

Developing content for delivery to a mobile context extends the range of form factors, browser capabilities and network characteristics which should be taken into account when compared with developing content with desktop delivery in mind. Having access to information describing the various relevant properties assists the content developer with developing such content. This document describes a standard API for access to repositories of such information (Device Description Repositories).

The following was the text for the previous version

Developing Web content for mobile devices is more challenging than developing for the desktop Web. Compared with desktop Web clients, Mobile Web devices come in a much wider range of shapes, sizes and capabilities. The Mobile Web developer relies upon accurate device descriptions in order to dynamically adapt content to suit the client. This document defines platform and language neutral programing interfaces that provide access to those device descriptions.

Status of this Document

This document is an editors' copy that has no official standing.

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is an Editorial Draft of a possible future W3C Recommendation.

Publication as an Editorial Draft does not imply endorsement by the Device Description Working Group or the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document is published as part of the W3C Mobile Web Initiative (MWI) by the Device Description Working Group. It is a deliverable as defined in the Charter of that group.

Please send comments to public-ddwg@w3.org. This list is archived at http://lists.w3.org/Archives/Public/public-ddwg/.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Revision Description

This revision contains a tidy-up of the earlier version with a reordering of sections, revision of certain introductory text, insertion of certain suggested text under 7 DDR-API Abstract Data Model and 8 Abstract API Definition and removal of IDL - with a view to reinserting it once the abstract data model and abstract API definition are closer to agreement.

It reflects discussions and resolutions from the July F2F.

Table of Contents

1 Introduction
    1.1 Uses for the DDR-API
    1.2 Scope
    1.3 Reading the Specification
        1.3.1 Conformance Information
            1.3.1.1 Normative and Informative Parts
            1.3.1.2 Normative Language for Conformance Requirements
2 Relationship with other specifications
    2.1 CC/PP
    2.2 DCCI
    2.3 DPE
    2.4 Delivery Context Ontology
3 Terminology
4 Conventions
    4.1 Documentation Conventions
        4.1.1 Bindings
    4.2 Naming Conventions
    4.3 Examples
5 Use Cases
6 Design Principles
7 DDR-API Abstract Data Model
    7.1 Introduction
    7.2 The Context Key
    7.3 Components
    7.4 Properties
        7.4.1 Property Names
            7.4.1.1 Namespaces for Property Names
            7.4.1.2 The Core Vocabulary
            7.4.1.3 Relationship between Vocabularies and the Delivery Context Ontology
        7.4.2 Property Values
        7.4.3 Property Collections
    7.5 Status Codes
    7.6 Common Datatypes
    7.7 Additional Types
    7.8 Metadata
8 Abstract API Definition
    8.1 All the functions jumbled together for now
        8.1.1 IdentifyByUAString
        8.1.2 IdentifyByHTTPHeaders
        8.1.3 GetPropertyValues
        8.1.4 GetAllPropertyValues
        8.1.5 ListProperties
        8.1.6 ListComponents
        8.1.7 IdentifyByPropertyValues
        8.1.8 MapContextKey
        8.1.9 ListComponentTypes
        8.1.10 AddComponent
        8.1.11 EditComponent
9 DDR Extensions
    9.1 Extending Device Descriptions and Properties
10 Conformance
    10.1 Conformance Requirements for DDR-API Implementations
11 WSDL Language Binding
    11.1 DDR-API Exception Interface
        11.1.1 Properties of DDR-APIException:
12 Binding rules for mapping APIs to any programming language

Appendices

A IDL Definitions for DDR-API
B Normative References
C Informative References (Non-Normative)
D Java API (Non-Normative)
E Informative Use Case: To Be defined (Non-Normative)
F Changes Since the Previous Version (Non-Normative)
    F.1 Normative Changes
    F.2 Informative Changes
G Acknowledgements (Non-Normative)


1 Introduction

This section is informative.

JR: This preamble would benefit from a write-through to make it more specific to the purpose of this document

Mobile Web development it is not as easy as conventional web development. Programmers must deal with a wide variety of device capabilities, an heterogeneous mix of software versions and different adherence to standards. For instance, there are different handsets (mobile phones, smart phones, PDAs) with different screen resolutions, input modes, memory, CPU constraints, etc.

Besides, although there is a convergence towards a unique markup language (XHTML), the reality nowadays is that different browsers support different versions of HTML-based and XML-based languages. Moreover, mobile web browsers that in theory support the same markup language often behave in different and unexpected manners. More generally speaking, the browser and the device are part of the delivery context, a set of attributes that characterizes the capabilities of the access mechanism, the preferences of the user and other aspects of the context into which a web page is to be delivered [DIGlossary].

The final page delivered to the user might depend on the delivery context. Top-quality mobile sites differentiate from less-quality sites because they take into account the delivery context when they are rendering a page. As a consequence, top-quality mobile sites provide the best user experience and usability, which is a critical point in the mobile space.

Device and browser descriptions are the two fundamental components of the delivery context. There are some properties of the device and browser that are immutable and typically are stored in repositories of information maintained by content adaptation solutions, mobile telco operators or open source projects. One example of such a property is the color resolution of the display on a mobile device.

Programmers demand standard application programming interfaces (APIs) that simplify and provide a unified way of accessing the device and browser properties stored in Device Description Repositories ([Definition: DDR]s). This document defines those interfaces - the [Definition: ].

2 Relationship with other specifications

Need to review this section, not sure that the following is in the right place, nor that CC/PP has a relationship with this spec. DCCI and DPE should no doubt appear, but what do we think the relationship is, exactly? Also, since the Core Vocabulary has a relationship with the Delivery Context Ontology, there is a relationship of some kind, which presumably should be spelled out there. We do have the idea of being able to explore the Ontological properties relating to a particular vocabulary entry, so the reference is needed here too.

The DDR-API provides mechanisms for:

3 Terminology

This section is informative.

Need to review this after we have written a bit more, plus it really needs to be normative?

DDRClient

An application that makes use of the DDR services to perform some functionality.

Device Description

A description of an element of the delivery context.

Device Property

Faceted Device Property

A device property that can have different values (default, maximum, actual ...).

Vocabulary

Context Key

A key that identifies a delivery context in a DDR under the scope of a client session.

Context Key Handler

An abstract identifier that points to a context key in an specific DDR regarding a client session.

4 Conventions

This section is informative.

5 Use Cases

Need a discussion in here of the use cases per the discussion at the F2F day 2 - i.e. simple recognition and property look up "the adaptation use case" (run time) vs the (design time) use case where you look for classes of devices, how many devices support x etc.

It would be useful to refer to the diagram we drew at the f2f, has anyone a copy of it?

6 Design Principles

This needs elaboration etc.

  1. Complexity, it should not be an onerous API.

  2. Methods must be useful. If there is a method for an obscure property, and it's not useful, we shouldn't have created it. Academically interesting properties shouldn't get specific methods.

  3. Easy to learn - limit number of functions

  4. Allow for efficient implementation

  5. Common use cases easy to do ... other uses harder but only in proportion to their inherent complexity

Need a discussion of object instantiation, who is responsible for it, and who is resposible for object disposal. Also need a discussion of thread safety etc.

The languages that will guide the design of the IDL are: Java, Ecmascript, Ruby, PHP, Python, Perl and the .net family (resolution at F2F)

7 DDR-API Abstract Data Model

This section is normative.

7.1 Introduction

The Delivery Context (DC) models the environment into which content is delivered. For Web Browsing, it includes, but is not limited to, network connections, gateways, proxies and a device running a browser (possibly with additional helper applications). The device may have additional hardware attached, such as an external keyboard, display monitor, speech generation and assistive technologies such as a screen reader. Each identifiable item is called a "component of the Delivery Context", or [Definition: Component], for short.

Each component of an actual delivery context has a type. The DDR API does not prescribe which components any given DDR implementation may choose to recognise, nor does it prescribe the precise definition of any particular component type. For example, any DDR implementation may choose to model the DC in any way - a conforming DDR must, however, implement components that support the attributes identified by the [version of the] Core Vocabulary insert refin some components. Typically, it is understood that most DDRs will share a similar view of the Component Types of "Device Hardware" and "Browser".

7.2 The Context Key

This could usefully be reworked into a discussion of "evidence" ...

The context key provides a handle to aspects of the delivery context that are of significance to the DDR, such as the components that have been determined to be present. From discussion at F2F plus further suggestion on list (ACTION-58):It is an opaque reference to a structure the details of which are determined on a per "instance type" basis. It is used in some API calls to provide part of the query information.

Since the structure of the Context Key is opaque it cannot be examined in a standardized way. Standard functions, are probably not in this revision though, however, provided to query the context key to yield

To allow for flexibility in implementations, the Context Key is modelled as an opaque type in the DDR-API IDL. The mapping between this and language data types depends on the capabilities of the language in question. but should we give examples of how we expect it to be realised e.g. as an Object in Java and as an untyped pointer or reference in languages that support it?

7.4 Properties

7.4.1 Property Names

Property names exist as entries in controlled vocabularies do we wish to define a normative format for defining such vocabularies. The controlled vocabularies are distinguished using namespaces. Vocabularies may also be versioned - per F2F discussion it is recommended that they not be distinguished by namespace, but the discussion did not reveal how it is suggested that they be distinguished.

8 Abstract API Definition

This section is normative

Before defining this as IDL I think it better to write a description of the functions, hence I have removed the IDL, for now

In this revision I am not going to distinguish between "core" and "additional"

In this revision I am not going to classify the functions either, though clearly it would be useful to classify them into things like get delivery context, find out about properties supported, get property values etc.

There was a discussion at the F2F about how one might use a context key plus additional explicit properties to refine values. It would be useful to try to weave in that aprt of the discussion that referred to "evidence"

8.1 All the functions jumbled together for now

placeholder for text classifying the functions in this section

9 DDR Extensions

10 Conformance

This section is normative. It gathers together the conformance requirements for implementations of DDR-API defined in this specification.

11 WSDL Language Binding

This section is normative. It describes a WSDL [WSDL] language binding for DDR-API.

12 Binding rules for mapping APIs to any programming language

This section is normative

A IDL Definitions for DDR-API

This appendix contains the complete OMG IDL [IDL] definitions for DDR-API

Consolidated IDL

B Normative References

WSDL
"WSDL (tbd)" (See #)
IETF RFC 2119
"Key words for use in RFCs to Indicate Requirement Levels", S. Bradner, March 1997 (See http://www.ietf.org/rfc/rfc2119.txt)
IDL
"OMG IDL Syntax and Semantics", Object Management Group. (See http://www.omg.org/technology/documents/formal/corba_2.htm)

C Informative References (Non-Normative)

tbd

D Java API (Non-Normative)

This section is informative

Editorial Note: The WG has not agreed yet if the Java Binding has to be normative or informative

E Informative Use Case: To Be defined (Non-Normative)

This section is informative. It provides an illustration of how the DDR-API could operate.

F Changes Since the Previous Version (Non-Normative)

This section describes the changes introduced in this version of the specification.

G Acknowledgements (Non-Normative)

This document was produced with the help of the Device Description Group participants: