François Daoust <fd@w3.org>
W3C Mobile Web Initiative
http://www.w3.org/2009/Talks/09-overtheair/
Over the Air
Imperial College London, UK, 25-26 September 2009
Supported by MobiWeb2.0, funded by European Union's FP7.
Photo by Elaine Vallet
Leading the Web to its full potential...
Photo by Elaine Vallet
X(HTML), CSS, XML, SVG, PNG, WCAG, RDF, XSLT, ...
Privacy, Semantic Web, Accessibility, eGovernement, Mobile Web, ...
Making Web access from a mobile device as simple as Web access from a desktop device.
Tim Berners-Lee, W3C Director and inventor of the Web
The W3C Markup Validator is probably the most well-known tool...
It's not the only one!
Mobile Web Best Practices 1.0:
I took mobile constraints into account
http://validator.w3.org/mobile
Encourage time-constrained authors
to address critical problems first
Best Practice | Best Practice explained | URIs (%) | Domains (%) |
---|---|---|---|
VALID_MARKUP | Create documents that validate to published formal grammars. | 77% | 87% |
MEASURES | Do not use pixel measures and do not use absolute units in markup language attribute values and style sheet property values. | 58% | 68% |
PAGE_SIZE_LIMIT | Ensure that the overall size of page is appropriate to the memory limitations of the device. | 54% | 66% |
CHARACTER_ENCODING_USE | Indicate in the response the character encoding being used. | 49% | 61% |
IMAGES_SPECIFY_SIZE | Specify the size of images in markup, if they have an intrinsic size. | 48% | 58% |
CONTENT_FORMAT_SUPPORT | Send content in a format that is known to be supported by the device. | 39% | 51% |
CACHING | Provide caching information in HTTP responses. | 39% | 50% |
TABLES_LAYOUT | Do not use tables for layout. | 34% | 38% |
POP_UPS | Do not cause pop-ups or other windows to appear and do not change the current window without informing the user. | 30% | 34% |
HTTP_RESPONSE | (Not a real best practice) | 27% | 33% |
Training courses on the Mobile Web Best Practices
Common API for access to Device Description Repositories
Generic implementation that may be re-used for access to other DDRs,
simple implementation on top of WURFL
http://dev.w3.org/cvsweb/2009/mobileok-authoring/common/ddrsimpleapi/
Tests basic support for common Web technologies
Machine-readable claims about a set of resources
http://www.w3.org/TR/powder-primer/
mobileOK™ is one of the use cases of POWDER
http://i-sieve.com/cgi-bin/mobileOK.cgi
From a classic client-server architecture...
... to an architecture of participation
Basic widget wrapper:
<widget xmlns='http://www.w3.org/ns/widgets'>
<name>Hello world!</name>
</widget>
For signing and verifying widgets
function getDiagonalSize(){
var x = widget.width;
var y = widget.height;
var hyp = Math.sqrt(x*x + y*y);
return hyp;
}
Security model controlling network access from within a widget.
Auto-update mechanism.
Alpha unstable version: http://qa-dev.w3.org:8001/widget/
(re-uses the mobileOK Checker library!)
A conservative use of resources will help to minimize the latency of a Web application, but a number of measures can also be used to further minimize the perceived latency.
Place JavaScript tags at the bottom of the page.
<html>
<head>
[...]
</head>
<body>
[...]
<script type="text/javascript" src="script.js"></script>
</body>
</html>
var worker = new Worker('worker.js');
worker.onmessage = function (event) {
document.getElementById('result').textContent = event.data;
};
Persistent data storage of key-value pair data in Web clients:
sessionStorage.foo='bar';
localStorage.fooo='bar';
Query data using SQL in Web clients:
db.readTransaction(function (t) {
t.executeSql('SELECT title, author FROM docs WHERE id=?', [id], function (t, data) {
report(data.rows[0].title, data.rows[0].author);
});
});
<input type="email" >
<input type="date" >
<input type="range" >
<input type="color" >
More semantics allow for more automation on mobile devices.
Canvas vs. SVG?
// canvas is a reference to a <canvas> element
var context = canvas.getContext('2d');
context.fillRect(0,0,50,50);
canvas.setAttribute('width', '300'); // clears the canvas
context.fillRect(0,100,50,50);
canvas.width = canvas.width; // clears the canvas
context.fillRect(100,0,50,50); // only this square remains
Last Call working draft
http://www.w3.org/TR/geolocation-API/
(implementations in Firefox 3.5, Safari Mobile, Google Gears)
function showMap(position) {
// Show a map centered at:
// - position.coords.latitude
// - position.coords.longitude
}
// One-shot position request.
navigator.geolocation.getCurrentPosition(showMap);
Device APIs and Policy Working Group
http://www.w3.org/2009/dap/
Starting points:
Not restricted to mobile devices!
If you want to delve into a spec,
there's a tool for that!
Open Source Software at W3C:
http://www.w3.org/Status
The Web as platform
is around the corner.
There's just One Web!
François Daoust <fd@w3.org>
W3C Mobile Web Initiative
http://www.w3.org/2009/Talks/09-overtheair/
Training courses on the Mobile Web Best Practices
Supported by MobiWeb2.0,
funded by European Union's FP7.