W3C home > Mailing lists > Public > public-device-apis@w3.org > January 2010

Re: Devices as Virtual Web Services

From: Max Froumentin <maxfro@opera.com>
Date: Thu, 28 Jan 2010 16:56:08 +0100
Message-ID: <4B61B398.3010802@opera.com>
To: Mark Baker <distobj@acm.org>
CC: public-device-apis@w3.org
Hi Mark,

On 27/01/2010 17:36, Mark Baker wrote:
> Granted, it's not suitable for everything, but it seems to me that
> there's some low hanging fruit such as the System Info API that could
> be easily done via the DOM.

That's exactly what W3C's DCCI does [1]: a DOM of system-properties. 
Yet, I don't think that that specification was ever implemented, let 
alone used, probably because the concept of a DOM of properties is too 
obscure for your basic system-property query (battery level, CPU load, 
etc.). You don't want to start exploring a hierarchy, let alone use DOM 
functions, you just want a function.

IMO the SysInfo API is a framework, an abstraction on top of either a 
DCCI or a REST implementation. Even more abstract than JQuery, if you like:

   /     \

You can either you write your Battery Monitor using bare-bones DCCI (see 
[1] appendix B to get an idea) or XHR, or you make it simpler for 
yourself with JQuery:

$.dcci("device battery", callback) if based on DCCI
$.get("device://battery", callback) if based on REST

or top-level-abstract-framework-agnostic:

navigator.sysinfo.get("Battery", callback)

[1] http://www.w3.org/TR/DPF/

Received on Thursday, 28 January 2010 15:56:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:41 UTC