forked from w3c-webmob/mobile-web-app-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
295 lines (277 loc) · 46.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Standards for Web Applications on Mobile: current state and roadmap</title>
<link rel="stylesheet" href="http://www.w3.org/2007/08/video/style.css" type="text/css"/>
<link rel="stylesheet" href="http://www.w3.org/2007/08/video/print.css" type="text/css" media="print"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:site" content="@w3c"/>
<meta name="twitter:creator" content="@dontcallmedom"/>
<meta name="twitter:title" content="Standards for Web Applications on Mobile — September 2013"/>
<meta name="twitter:description" content="This document summarizes the various technologies developed in W3C that increase the capabilities of Web applications, and how they apply more specifically to the mobile context as of September 2013"/>
<meta name="twitter:image" content="http://www.w3.org/Mobile/mobile-web-app-state/webapp.png"/>
</head>
<body>
<div id="page">
<h1>Standards for Web Applications on Mobile: current state and roadmap</h1>
<h2 id="month"></h2>
</div>
<div id="main">
<p class="logo">
<a href="/">
<img alt="W3C" src="/Icons/w3c_home"/>
</a>
</p>
<dl class="versions">
<dt>Latest version</dt>
<dd>
<a href="http://www.w3.org/Mobile/mobile-web-app-state/">http://www.w3.org/Mobile/mobile-web-app-state/</a>
</dd>
<dt>This version</dt>
<dd id="this"> (<a href="Overview.pdf">PDF version</a>)</dd>
<dt>Previous version</dt>
<dd id="prev"></dd>
</dl>
<p>Web technologies have become powerful enough that they are used to build full-featured applications; this has been true for many years in the desktop and laptop computer realm, but is increasingly so on mobile devices as well.</p>
<p>This document summarizes the various technologies developed in W3C that increase the capabilities of Web applications, and how they apply more specifically to the mobile context. A good subset of these technologies are described and explained in the <a href="http://www.w3devcampus.com/writing-great-web-applications-for-mobile/">W3C on-line training on programming Web applications</a>.</p>
<ol>
<li><a href="#Graphics">Graphics</a></li>
<li><a href="#Multimedia">Multimedia</a></li>
<li><a href="#Device_Adaptation">Device Adaptation</a></li>
<li><a href="#Forms">Forms</a></li>
<li><a href="#User_interactions">User interactions</a></li>
<li><a href="#Data_storage">Data storage</a></li>
<li><a href="#Personal_Information_Management">Personal Information Management</a></li>
<li><a href="#Sensors_and_hardware_integration">Sensors and hardware integration</a></li>
<li><a href="#Network">Network</a></li>
<li><a href="#Communication_and_Discovery">Communication_and_Discovery</a></li>
<li><a href="#Packaging">Packaging</a></li>
<li><a href="#Performance_.26_Optimization">Performance & Optimization</a></li>
</ol>
<section>
<h2>Document structure</h2>
<p>The features that these technologies add to the Web platform are organized under the following categories: <a href="#Graphics">graphics</a>, <a href="#Multimedia">multimedia</a>, <a href="#Device_Adaptation">device adaptation</a>, <a href="#Forms">forms</a>, <a href="#User_interactions">user interactions</a>, <a href="#Data_storage">data storage</a>, <a href="#Personal_Information_Management">personal information management</a>, <a href="#Sensors_and_hardware_integration">sensors and hardware integration</a>, <a href="#Network">network</a>, <a href="#Communication_and_Discovery">communication and discovery</a>, <a href="#Packaging">packaging</a>, <a href="#Performance_.26_Optimization">performance & optimization</a>.</p>
<p class="figure"><object type="image/svg+xml" data="webapp.svg" style="width:600px;height:308px"><a href="webapp.svg" title="SVG version of the diagram"><img src="webapp.png" alt="Diagram showing the various components of the Web platform" width="600" height="308"/></a></object><br/>The Web as an application development platform</p>
<p>In each category, a table summarizes for each feature:</p>
<ul>
<li>which W3C specification defines the feature; specifications that have been identified as of particular importance in the <a href="http://coremob.github.io/coremob-2012/FR-coremob-20130131.html">Core Mobile Web Platform 2012 report</a> are marked with a medal,</li>
<li>which W3C group is responsible of the said specification,</li>
<li>the stage of the specification in the W3C Recommendation track (see below),</li>
<li>the estimated stability of the feature, i.e. how little the author expects it to change, from an early draft that can still evolve a lot, to a finished document with only minor expected changes,</li>
<li>a link to the latest editors draft of the document, and a representation of the recent editing activity;</li>
<li>some qualitative indication on availability of implementations on mobile devices, based on data collected primarily from <a href="http://caniuse.com/">Can I Use…</a> and <a href="http://mobilehtml5.org/">mobile HTML5</a>, completed with data from <a href="https://developer.mozilla.org/" title="https://developer.mozilla.org/">Mozilla developer network</a>, <a href="http://quirksmode.org/">QuirksMode</a>, as well as the author’s understanding of the mobile devices market (see also the <a href="https://github.com/dontcallmedom/canmymobilebrowser" title="https://github.com/dontcallmedom/canmymobilebrowser">code used to generate the support icons</a>)</li>
<li>When available, a link to a relevant tutorial on <a href="http://docs.webplatform.org/wiki/Main_Page">WebPlatform Docs</a>, and to relevant <a href="http://www.w3devcampus.com/">on-line training courses on W3DevCampus</a></li>
<li>a link to the test suite for the said feature, and when relevant, a github ribbon to access the underlying git repository.</li>
</ul>
<p>As a reminder, W3C creates Web standards by progressing documents through its <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#Reports">Recommendation track</a>, with the following stages:</p>
<ul id="rectrack">
<li id="ed" class="recstage"><img src="http://www.w3.org/2013/09/wpd-rectrack-icons/ed.svg" alt="" width="50" height="50"> “Editors drafts” represent the current view of the editors of the specification but have no standing in terms of standardization.</li>
<li id="wd" class="recstage"><img src="http://www.w3.org/2013/09/wpd-rectrack-icons/wd.svg" alt="" width="50" height="50"> “Working Drafts” (WD) are early milestones of the Working Group progress.</li>
<li id="lcwd" class="recstage"><img src="http://www.w3.org/2013/09/wpd-rectrack-icons/lcwd.svg" alt="" width="50" height="53"> “Last Call Working Drafts” signal that the Working Group has determined that the specification fulfills its requirements and all the known issues have been resolved, and thus requests feedback from the larger community.</li>
<li id="cr" class="recstage"><img src="http://www.w3.org/2013/09/wpd-rectrack-icons/cr.svg" alt="" width="50" height="50"> “Candidate Recommendations” (CR) trigger a call for implementations where implementers are invited to implement the specification and send feedback; Working Groups are expected to show the specification gets implemented by running test suites they have developed.</li>
<li id="pr" class="recstage"><img src="http://www.w3.org/2013/09/wpd-rectrack-icons/pr.svg" alt="" width="50" height="50"> “Proposed Recommendations” (PR) manifests that the group has gathered sufficient implementation experience, and triggers the final review by W3C Members</li>
<li id="rec" class="recstage"><img src="http://www.w3.org/2013/09/wpd-rectrack-icons/rec.svg" alt="" width="50" height="53"> “W3C Recommendations” (Rec) are stable and completed Web standards; these documents only get updated rarely, through the “Edited Recommendation” process, as a results from errata collected by Working Groups.</li>
</ul>
<p>Prior to starting standardization, a Working Group needs to be chartered, based on input from W3C Members, often through the organization of a <a href="http://www.w3.org/2003/08/Workshops/">workshop</a>, or after the reception of a <a href="http://www.w3.org/Submission/">W3C Member Submission</a>.</p>
<p>W3C has set up <a href="http://www.w3.org/community/">Community Groups</a>, a mechanism that allows anyone to do experimental work within the W3C infrastructure, under IPR rules that are compatible to transition the work to the W3C standardization process.</p>
</section>
<section class="featureset">
<h2 id="Graphics">1.
Graphics </h2>
<div data-feature="2D Vector Graphics">
<p><strong><a data-featureid="svg12">SVG</a></strong>, Scalable Vector Graphics, provides an XML-based markup language to describe two-dimensions vector graphics. Since these graphics are described as a set of geometric shapes, they can be zoomed at the user request, which makes them well-suited to create graphics on mobile devices where screen space is limited. They can also be easily animated, enabling the creation of very advanced and slick user interfaces.</p>
<p>The integration of SVG in HTML5 opens up new possibilities, for instance applying advanced graphic filters (through SVG filters) to multimedia content, including videos. <a data-featureid="svg2">SVG 2.0</a> is set to facilitate that integration and complete the set of features in SVG.</p></div>
<p data-feature="2D Programmatic API">In complement to the declarative approach provided by SVG, the <strong><code><canvas></code></strong> element added in HTML5 enables a <a data-featureid="canvas">2D programmatic API</a> that is well-suited for processing graphics in a less memory intensive way. That API not only allows rendering graphics, but can also be used to do image processing and analysis — <a href="http://www.w3.org/TR/html51/">HTML 5.1</a> adds the ability to do that <a data-featureid="canvasproxy">processing in a separate Web Worker</a>.</p>
<p>Both SVG and HTML can be styled using <strong><a href="http://www.w3.org/standards/techs/css">CSS</a></strong> (Cascading Style Sheets); in particular, CSS3 (the third level of the specification) is built as a collection of specifications set to offer a large number of new features that make it simple to create graphical effects, such as <a data-featureid="css-border" data-feature="Rounded Corners">rounded corners</a>, <a data-featureid="css-border" data-feature="Complex background images">complex background images</a>, <a data-feature="Box shadow effects" data-featureid="css-border">shadow effects</a> (<cite><a href="http://www.w3.org/TR/css3-background/">CSS Backgrounds and Borders</a></cite>), <a data-feature="2D Effects" data-featureid="css-2d">rotated content</a> (<cite><a href="http://www.w3.org/TR/css3-transforms/">CSS Transforms</a></cite>, including with <a data-feature="3D Effects" data-featureid="css-3d">3D effects</a>).</p>
<div data-feature="Animations">
<p>Animations can be described declaratively vi(<cite><a data-featureid="css-animation">CSS Animations</a></cite>, and <cite><a data-featureid="css-transitions">CSS Transitions</a></cite>).</p>
<p>Animations can also be managed via scripting through the API exposed in <a data-featureid="webanimations">Web Animations</a>; as they can be resource intensive, the possibility offered by the <cite><a data-featureid="animation-timing">Timing control for script-based animations API</a></cite> to manage the rate of updates to animations can help keep them under control.</p>
</div>
<p data-feature="Complex layouts"><a data-featureid="flexbox">CSS Flexbox</a> allows to build complex layouts as required for interactive applications on small screens.</p>
<p data-feature="Downloadable fonts">Fonts play also an important role in building appealing graphical interfaces, but mobile devices are in general distributed with only a limited set of fonts. <strong><a data-featureid="woff">WOFF 1.0</a></strong> (<cite>Web Open Font Format</cite>) addresses that limitation by making it easy to use fonts that are automatically downloaded through style sheets, while keeping the size of the downloaded fonts limited to what is actually needed to render the interface. The upcoming <a data-featureid="woff2">WOFF 2.0</a> update to that format promises 25%-smaller download sizes, reducing the time needed to download and display these fonts.</p>
<p data-feature="Fullscreen display">Another important aspect in graphics-intensive applications (e.g. games) is the possibility to use the entire screen to display the said graphics; the <strong><cite><a data-featureid="fullscreen">Fullscreen API</a></cite></strong> lets a Web application requests and detects full screen display.</p>
<p data-feature="Orientation Lock">Likewise, in these scenarios, it is often useful to be able to <strong>lock the orientation of the screen</strong>; the <cite><a data-featureid="screenlock">Screen Orientation API</a></cite> allows not only to detect orientation change, but also to lock the orientation in a specific state.</p>
<p>NB: a <a href="http://www.khronos.org/webgl/">3D graphic API for HTML5 <code>canvas</code>, called WebGL</a>, has been developed outside of W3C, as part of the <a href="http://www.khronos.org/">Khronos Group</a>; this API has been built to be compatible with <a href="http://www.khronos.org/opengles/">OpenGL ES</a>, i.e. for embedded systems, and is intended to work on mobile devices.</p>
<script id="template" type="application/template">
<table>
<thead>
<tr>
<th>Feature</th>
<th>Specification</th>
<th>Working Group</th>
<th>Maturity</th>
<th>Stability</th>
<th>Latest editors draft</th>
<th>Current implementations</th>
<th>Developers doc</th>
<th>Test suite</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</script>
</section>
<section class="featureset">
<h2 id="Multimedia">2.
Multimedia </h2>
<p>HTML5 adds two tags that dramatically improve the integration of multimedia content on the Web: the <code><strong data-feature="Video playback" ><a data-featureid="video"><video></a></strong></code> and <code><strong data-feature="Audio playback"><a data-featureid="audio"><audio></a></strong></code> tags. Respectively, these tags allow embedding video and audio content, and make it possible for Web developers to interact much more freely with that content than they would through plug-ins. They make multimedia content first-class citizens of the Web, the same way images have been for the past 20 years.</p>
<p data-feature="Generation of media content">The playback content can be augmented and completed via <a data-featureid="mse">Media Source Extensions</a> that lets developers generate media content in JavaScript.</p>
<p data-feature="Protected content playback">To cater for the needs of some content providers, a proposal to enable <strong>playback of protected content</strong>, <cite><a data-featureid="eme">Encrypted Media Extensions</a></cite> is an API that is under consideration in the <a href="http://www.w3.org/html/wg/">HTML Working Group</a>.</p>
<p data-feature="Multimedia Gallery access">The <cite><a data-featureid="gallery">Pick Media Intent</a></cite> offers a Web-intent based approach to search and retrieve <strong>locally or remotely stored media content</strong>, while the <a data-featureid="discovery"><cite>Network Service Discovery</cite> API</a> opens the door for integrating DLNA-hosted content into Web applications.</p>
<p data-feature="Capturing audio/video">While the new HTML5 tags allow to play multimedia content, the <cite><a data-featureid="inputaccept">HTML Media Capture</a></cite> defines a <strong>markup-based mechanism to access captured multimedia content</strong> using attached camera and microphones, a very common feature on mobile devices. The <a href="http://www.w3.org/2011/04/webrtc/">Web Real-Time Communications Working Group</a> and the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> are building together an <a data-featureid="getusermedia">API (<code>getUserMedia</code>)</a> to directly manipulate <strong>streams from camera and microphones</strong>, as well as an <a data-featureid="recording">API to record these streams</a> into files, and another API to use access to cameras to <a data-featureid="imagecapture">take photos programatically</a>.</p>
<p data-feature="Image & Video analysis, modification">Beyond capturing and recording, two additional APIs add multimedia manipulation capabilities to the Web platform. We have already mentioned the <cite><a data-featureid="canvas">Canvas 2D Context</a></cite> API: it enables modifying images, which in turn opens up the possibility of <strong>video editing</strong>.</p>
<p data-feature="Audio analysis, modification">In a similar vein, the <a href="http://www.w3.org/2011/audio/">Audio Working Group</a> is working on an API that that makes it possible to modify audio content, as well as <strong>analyze, modify and synthesize sounds</strong>, the <a data-featureid="webaudio">Web Audio API</a>.</p>
<p>The combination of all these features marks the starting point of the Web as a comprehensive platform for multimedia, both for consuming and producing. The rising interest around bridging the Web and TV worlds (manifested through the <a href="http://www.w3.org/2011/webtv/">W3C Web and TV Interest Group</a>) should strengthen that trend in the coming months. Mobile devices are expected to take a growing role in many users TV experience, providing a “second screen” experience, where users can find more information on or interact with a TV program they're watching via their mobile devices.</p>
</section>
<section class="featureset">
<h2 id="Device_Adaptation">3.
Device Adaptation </h2>
<p>Mobile devices not only differ widely from traditional computers, but they also have a lot of variations among themselves, in term of screen size, resolution, type of keyboard, media recording capabilities, etc.</p>
<p data-feature="Device information">The <a data-featureid="ddr">Device Description Repository API</a> is a unified server-side API that allows Web developers to retrieve data on the devices that are accessing their pages on a variety of device information database.</p>
<p data-feature="Media Capture Capabilities">The <a data-featureid="getusermedia-cap">Media Capture Streams</a> API exposes some specific information on capabilities of camera and microphones to make it possible to take advantage of the large variety of media capturing devices provided on mobile phones.</p>
<p data-feature="CSS-based adaptation"><a data-featureid="mediaqueries">CSS Media Queries</a> offer a mechanism that allows adapting the layout and behavior of a Web page based on some of the characteristics of the device, including the screen resolution — to which <a data-featureid="mediaqueries4">Media Queries Level 4</a> proposes to add the availability and type of a pointing device, the ability to hover over elements, and the ambient luminosity. <a data-featureid="css-device-adapt">CSS Device Adaptation</a> defines a set of CSS directives to define the size on which this layout should be based, relatively to the size of the underlying device — specifying what has been implemented using the <code><meta name="viewport"></code> element so far.</p>
<div data-feature="Responsive images">
<p>The <a href="http://www.w3.org/community/respimg/">Responsive Images Community Group (RICG)</a> is currently working on an extension to HTML, known as the <a data-featureid="picture"><code>picture</code> element</a>, that allows authors define what image to load depending on device capabilities and/or other media features. The RICG publishes a <a href="http://usecases.responsiveimages.org/">use cases and requirements</a> document that fully describes the problem.</p>
<p>As a complementary approach, the <a data-featureid="srcset"><code>srcset</code> attribute</a>, specified by the <a href="http://www.w3.org/community/whatwg/">WHATWG</a> and also published as an extension to HTML, let Web developers define the various device pixel ratios of an image, letting the browser pick the best choice for the pixel density of the screen.
As of January 2014, there is general agreement amongst browser vendors to implement both <code>picture</code> and <code>srcset</code>.</p>
<p>Some work was also undertaken into a new responsive images proposal called "srcN". However, that approach was rejected by the community and by browser vendors. It did, however, serve as a catalyst for unifying <code>picture</code> and <code>srcset</code>. </p>
</div>
</section>
<section class="featureset">
<h2 id="Forms">4.
Forms </h2>
<p>The ability to build rich forms with HTML is the basis for user input in most Web-based applications. Due to their limited keyboards, text input on mobile devices remains a difficult task for most users; <cite><a href="http://www.w3.org/html/wg/drafts/html/CR/">HTML5</a></cite> address parts of this problem by offering new type of form controls that optimize the way users will enter data:</p>
<ul>
<li data-feature="Date and time entries"><strong><a data-featureid="inputdate">date and time entries</a></strong> can take advantage of a number of dedicated form controls (e.g. <code><input type="date"></code>) where the user can use a native calendar control;</li>
<li data-feature="Customized text entries (tel, email, url)">the <code><a data-featureid="inputtext"><input type="<strong>email</strong>"></a></code>, <code><a href="http://www.w3.org/html/wg/drafts/html/CR/forms.html#telephone-state-(type=tel)"><input type="<strong>tel</strong>"></a></code> and <code><a href="http://www.w3.org/html/wg/drafts/html/CR/forms.html#url-state-(type=url)"><input type="<strong>url</strong>"></a></code> can be used to optimize the ways user enter these often-difficult to type data, e.g. through dedicated virtual keyboards, or by accessing on-device records for these data (from the address book, bookmarks, etc.);</li>
<li data-feature="Input modality">the <code><a data-featureid="inputmode"><strong>inputmode</strong></a></code> attribute (proposed in HTML 5.1) defines the type of textual input expected in a text entry;</li>
<li data-feature="Input pattern">the <code><a data-featureid="inputpattern"><strong>pattern</strong></a></code> attribute allows both to guide user input as well as to avoid server-side validation (which requires a network round-trip) or JavaScript-based validation (which takes up more resources);</li>
<li data-feature="Input hint">the <code><strong><a data-featureid="inputhint">placeholder</a></strong></code> attribute allows to guide user input by inserting hints as to what type of content is expected in a text-entry control;</li>
<li data-feature="Autocomplete for text entries">the <code><a data-featureid="datalist"><datalist></a></code> element allows creating free-text input controls coming with <strong>pre-defined values</strong> the user can select from; HTML 5.1 defines a mechanism for the <a data-featureid="autocomplete"><code>autocomplete</code> attribute</a> to automatically fill input fields based on <strong>well-known data</strong> for the user.</li>
</ul>
</section>
<section class="featureset">
<h2 id="User_interactions">5.
User interactions </h2>
<div data-feature="Touch-based interactions">
<p>An increasing share of mobile devices relies on touch-based interactions. While the traditional interactions recognized in the Web platform (keyboard, mouse input) can still be applied in this context, a more specific handling of touch-based input is a critical aspect of creating well-adapted user experiences, which <strong><a data-featureid="touchevent">Touch Events in the DOM</a></strong> (Document Object Model) enable. The work on that specification is now nearly finished.</p>
<p>Meanwhile, the <a href="http://www.w3.org/2012/pointerevents/">Pointer Events Working Group</a> has made good progress on an alternative approach to handle user input, <a data-featureid="pointer-events">Pointer Events</a>, that allows to handle mouse, touch and pen events under a single model. This new approach is expected to replace the currently more widely deployed Touch Events.</p>
</div>
<p data-feature="Smooth scrolling">As more and more content gets rendered as long scrollable lists, more and more logic is attached to scrolling events, and the quality of the user experience of these actions is highly dependent on their performances. The <a data-featureid="smooth-scroll">CSSOM View Module</a> determines when scrolling events get fired, and let developers specify the type of scrolling behavior they want.</p>
<p data-feature="On-screen keyboard interactions">Many mobile devices use on-screen keyboards to let users type; the <a data-featureid="ime">Input Method Editor (IME) API</a> makes it possible to coordinate the interactions between that on-screen keyboard and Web applications.</p>
<p data-feature="Vibration">Conversely, many mobile devices use haptic feedback (such as vibration) to create new form of interactions (e.g. in games); work on a <strong><a data-featureid="vibration">vibration API</a></strong> in the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> is making good progress.</p>
<p data-feature="Intent-based events">But as the Web reaches new devices, and as devices gain new user interactions mechanisms, it also becomes important to allow Web developers to react to a more abstract set of user interactions: instead of having to work in terms of “click”, “key press”, or “touch event”, being able to react to an “undo” command, or a “next page” command independently of how the user instructed it to the device will prove beneficial to the development of device-independent Web applications. The <a data-featureid="indieui">IndieUI Events</a> specification, developed by the <a href="http://www.w3.org/WAI/IndieUI/">Indie UI Working Group</a>, aims at addressing this need.</p>
<p data-feature="Notification">Mobile devices follow their users everywhere, and many mobile users rely on them to remind them or notify them of events, such as messages: the <cite><strong><a data-featureid="notification">Web Notifications</a></strong></cite> specification proposes to add that feature to the Web environment.</p>
<p data-feature="Speech-based interactions">Mobile devices, and mobile phones in particular, are also in many cases well-suited to be used through voice-interactions; the <a href="http://www.w3.org/community/speech-api/"><strong>Speech API Community Group</strong></a> is exploring the opportunity of starting standardization work around a <a data-featureid="speechinput">JavaScript API</a> that would make it possible for users to interact with a Web page through spoken commands.</p>
<div data-feature="Accessibility">
<p>The hardware constraints of mobile devices, and their different usage context can make <a href="http://www.w3.org/WAI/mobile/experiences">mobile users experience similar barriers to people with disabilities</a>. These similarities in barriers mean that similar solutions can be used to cater for them, <a href="http://www.w3.org/WAI/mobile/overlap">making a Web site accessible both for people with disabilities and mobile devices</a> a natural goal (as detailed in <a data-featureid="mwbp-wcag">Relationship between Mobile Web Best Practices and WCAG</a>).</p>
<p>How Web Content Accessibility Guidelines (WCAG) and User Agent Accessibility Guidelines (UAAG) provide guidance on mobile accessibility — that is, making websites and applications more accessible to people with disabilities when they are using mobile phones and a broad range of other devices — is discussed in <a href="http://www.w3.org/WAI/mobile/">Mobile Accessibility</a>.</p>
<p><a data-featureid="aria"><cite>WAI-ARIA</cite></a> provides semantic information on widgets, structures and behaviors hooks to make Web applications more accessible, including on mobile devices.</p>
</div>
</section>
<section class="featureset">
<h2 id="Data_storage">6.
Data storage </h2>
<p>A critical component of many applications is the ability to save state, export content, as well as integrate data from other files and services on the system.</p>
<p data-feature="Simple data storage">For simple data storage, the <cite><strong><a data-featureid="webstorage">Web Storage</a></strong></cite> specification offers two basic mechanisms, <code>localStorage</code> and <code>sessionStorage</code>, that can preserve data respectively indefinitely, or on a browser-session basis.</p>
<p data-feature="File operations">For richer interactions, the Web platform has a growing number of APIs to interact with a device filesystem: the <cite><strong><a data-featureid="filereader">File Reader API</a></strong></cite> makes it possible to load the content of a file, the <cite><strong><a data-featureid="filewrite">File Writer API</a></strong></cite> allows saving or modifying a file, while the nascent <strong><a data-featureid="filesystem" href="http://dev.w3.org/2009/dap/file-system/file-dir-sys.html">FileSystems API</a></strong> give access to more general file operations, including directory management. Discussions have started on whether these two latter APIs would better be implemented on top of IndexedDB, and a proposal for a <a data-featureid="fs2">new sandboxed filesystem API</a> has been brought forward.</p>
<p data-feature="Database query/update">On top of this file-based access, the <cite><strong><a data-featureid="indexeddb">Indexed Database API</a></strong></cite> (IndexedDB) defines a database of values and hierarchical objects that integrates naturally with JavaScript, and can be queried and updated very efficiently. Note that the work around a <a data-featureid="websql">client-side SQL-based database</a>, which had been started in 2009, has been abandoned in favor of this new system.</p>
<p data-feature="Quota for storage">As more and more data need to be stored by the browser (e.g. for offline usage), it becomes critical for developers to get reliable storage space, which the proposed <strong><a data-featureid="quota">Quota Management API</a></strong> will offer to Web applications.</p>
<p data-feature="Encrypted storage">Likewise, as some of this data need to be encrypted, the emerging <a data-featureid="crypto">Web Cryptography API</a> from the <a href="http://www.w3.org/2012/webcrypto/">Web Cryptography Working Group</a> exposes strong cryptography primitives to Web applications, and can be bound to pre-provisioned keys via the <a data-featureid="cryptokey">WebCrypto Key Discovery</a> API.</p>
</section>
<section class="featureset">
<h2 id="Personal_Information_Management">7.
Personal Information Management </h2>
<p>Applications can benefit from integrating with their users’ existing data records; on mobile devices, the address book and calendar are particularly useful source of information.</p>
<div data-feature="Addressbook data">
<p>The <cite><strong><a data-featureid="contacts">Contacts API</a></strong></cite> was developed on top of a Web-intents approach for accessing the addressbook from within the Web browser, but given the lack of progress behind Web Intents, has now been abandoned.</p>
<p>For Web apps outside of the browser, a purely programmatic approach is part of the <a href="http://www.w3.org/2012/05/sysapps-wg-charter.html">System Applications Working Group</a>, with work on a <a data-featureid="contacts-sys">Contacts Manager API</a> in progress.</p>
</div>
<p data-feature="Calendar data">A Web-Intent based <cite><strong><a data-featureid="calendar" href="http://dev.w3.org/2009/dap/calendar/">Calendar API</a></strong></cite> for in-browser apps was also under development, but has now been abandoned as well.</p>
</section>
<section class="featureset">
<h2 id="Sensors_and_hardware_integration">8.
Sensors and hardware integration </h2>
<p>Mobile devices are packed with sensors, making them a great bridge between the real and virtual worlds: GPS, accelerometer, ambient light detector, microphone, camera, thermometer, etc.</p>
<p>To take full advantage of these sensors in mobile Web applications, Web developers need to be provided with hooks to interact with them.</p>
<p data-feature="Geolocation">The <cite><strong><a data-featureid="geolocation">Geolocation API</a></strong></cite> provides a common interface for locating the device, independently of the underlying technology (GPS, WIFI networks identification, triangulation in cellular networks, etc.). Work towards a new version of the API that would include geofencing is <a href="http://lists.w3.org/Archives/Public/public-geolocation/2014Jan/0008.html">under consideration</a>.</p>
<p data-feature="Motion sensors">Web applications can also now access <strong>orientation and acceleration</strong> data via the <cite><a data-featureid="accelerometer">DeviceOrientation Event Specification</a></cite>.</p>
<p>A number of APIs for other sensors are under development: the <a data-feature="Battery Status" data-featureid="battery">Battery Status API</a>, the <a data-feature="Proximity sensors" data-featureid="proximity"><cite>Proximity Events</cite> API</a>, the <a data-feature="Ambient Light sensor" data-featureid="ambientlight"><cite>Ambient Light Events</cite> API</a> or the proposed <a data-feature="Humidity sensor" data-featureid="humidity"><cite>Ambient Humidity Events</cite> API</a>.</p>
<p data-feature="Camera & Microphone streams">As already mentioned in the section on <a href="#Multimedia">multimedia</a>, there is ongoing work on <a data-featureid="getusermedia">APIs to open up access to camera and microphone</a> streams.</p>
<p data-feature="NFC">The opportunity for Web applications to use <strong>Near-Field Communications (NFC)</strong> mechanisms have led to the chartering of <a href="http://www.w3.org/2012/nfc/">the NFC Working Group</a> to develop a <a data-featureid="nfc">Web NFC API</a>.</p>
<p>A more global access to sensors and hardware (including USB and bluetooth) is in scope for the <strong><a href="http://www.w3.org/2012/sysapps/">System Applications Working Group</a></strong>.</p>
</section>
<section class="featureset">
<h2 id="Network">9.
Network </h2>
<p>Network connectivity represents a major asset for mobile devices: the Web is an immense store of content, as well as an almost endless source of processing power, overcoming two of the limitations of mobile devices.</p>
<p>The Web platform is growing a number of APIs that facilitate establishing network connectivity in different contexts.</p>
<div data-feature="HTTP(s) network API">
<p><cite><strong><a data-featureid="xhr2">XMLHttpRequest</a></strong></cite> (the basis for Ajax development) is a widely deployed API to load content from Web servers using the HTTP and HTTPs protocol: the W3C specification (formerly known as <cite>XMLHttpRequest Level 2</cite>) completes the existing deployed API with the ability to make requests on servers in a different domain, programmatic feedback on the progress of the network operations, and more efficient handling of binary content.</p>
<p>The recently started <cite><strong><a data-featureid="beacon">Beacon</a></strong></cite> API would let developers queue unsupervised HTTP requests, leaving it to the browser to execute them when appropriate, opening the door for better network optimizations.</p>
</div>
<p data-feature="Cross-domain requests">By default, browsers do not allow to make request across different domains (or more specifically, across different <dfn class="def">origins</dfn>, a combination of the protocol, domain and port) from a single Web page; this rule protects the user from having a Web site abusing their credentials and stealing their data on another Web site. Sites can opt-out of that rule by making use of the <cite><strong><a data-featureid="cors">Cross-Origin Resource Sharing</a></strong></cite> mechanism, opening up much wider cooperation across Web applications and services.</p>
<div data-feature="Server-pushed requests">
<p>XMLHttpRequest is useful for client-initiated network requests, but mobile devices with their limited network capabilities and the cost that network requests induce on their battery (and sometimes on their users bill) can often make better use of server-initiated requests. The <cite><strong><a data-featureid="eventsource">Server-Sent Events</a></strong></cite> API allows triggering DOM events based on push notifications (via HTTP and other protocols.)</p>
<p>Early work on a <strong><a data-featureid="push">Push API</a></strong> would allow Web applications to receive server-sent messages whether or not the said Web app is active in a browser window. As patents had been disclosed on that API, a <a href="http://www.w3.org/2013/03/push-pag-charter">Patent Advisory Group</a> was formed to assess the situation and <a href="http://www.w3.org/2013/10/push-api-pag-report.html">concluded</a> that the disclosed patents did not read on the specification.</p>
</div>
<p data-feature="Bidirectional connections">The <cite><strong><a data-featureid="websockets">WebSocket API</a></strong></cite>, built on top of the IETF <cite><a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-05">WebSocket protocol</a></cite>, offers a bidirectional, more flexible, and less resource intensive network connectivity than XMLHttpRequest.</p>
<p data-feature="P2P data connections">The work on <a data-featureid="p2p">Web Real-Time Communications</a> will also provide direct <strong>peer-to-peer data connections</strong> between browsers with real-time characteristics, opening the way to collaborative multi-devices Web applications.</p>
<p data-feature="on-line state">Of course, an important part of using network connectivity relies on being able to determine if such connectivity exists, and the type of network available. The <a href="http://www.w3.org/html/wg/drafts/html/CR/browsers.html#browser-state">HTML5 <strong>onLine DOM flag</strong></a> (and its associated change event, <code>ononline</code>) signals when network connectivity is available to the Web environment.</p>
<p data-feature="Network characteristics">The <a data-featureid="networkapi"><strong>network-information API</strong></a> addresses discovery of the network characteristics — the granularity of these characteristics (type of connectivity, or estimated bandwidth, or …) is under intense discussion. The <strong><a data-featureid="res-timing">Resource Timing</a> API</strong> offers to measure precisely the impact of the network on the time needed to load various resources, offering another approach to adapt a Web app to its network environment.</p>
</section>
<section class="featureset">
<h2 id="Communication_and_Discovery">10.
Communication and Discovery </h2>
<p>Beyond connection to on-line services, allowing communications between users, but also between devices and between applications is an important aspect of a good mobile development platform. To communicate with unknown devices or pre-existing services, a discovery component is critical.</p>
<p data-feature="Emails, SMS and MMS">For Web apps not in a browser, the <a href="http://www.w3.org/2012/sysapps/">System Applications Working Group</a> is working on a complete <a data-featureid="messaging-sys">Messaging API</a>.</p>
<div data-feature="Inter-app communications">
<p>The <code><strong>postMessage</strong></code> API of <cite><a data-featureid="postmessage">HTML5 Web Messaging</a></cite> allows for Web Applications to communicate between each other.</p>
<p>A joint task force of the Device APIs and Web Apps Working Groups had been looking at a mechanism called <a data-featureid="intents">Web Intents</a>: it aimed at closer integration of Web applications, as well as of Web applications with native applications. Some of the initial use cases for Web Intents have proved hard to expose through the regular Web browser UI, and thus the work has now been abandoned.</p>
</div>
<p data-feature="Network services discovery">The <a data-featureid="discovery">Network Service Discovery</a> API offers to discover services on the local network (such as the ones offered via DLNA), enabling mobile Web applications to integrate seamlessly with these services.</p>
<p>The <strong><a href="http://www.w3.org/2011/04/webrtc/">Web Real-Time Communications Working Group</a></strong> is the host of specifications for a wider set of communication opportunities:</p>
<ul>
<li data-feature="P2P connections and audio/video streams"><strong><a data-featureid="p2p">Peer-to-peer connection</a></strong> across devices,</li>
<li><strong>P2P Audio and video streams</strong> allowing for real-time communications between users.</li>
</ul>
</section>
<section class="featureset">
<h2 id="Packaging">11.
Packaging </h2>
<p>An important aspect of the user experience of applications is linked to how the user perceives the said application is available permanently (even when off-line, which is particularly important on mobile devices), as well as how it can be shared and distributed, typically through purchases via applications stores — this is adequately addressed by packaging the application.</p>
<p>The Web platform offers two complementary approaches to packaging Web applications:</p>
<ul>
<li data-feature="Offline Web apps">HTML5’s <code><strong><a data-featureid="manifest">ApplicationCache</a></strong></code> enables access to Web applications off-line through the definition of a manifest of files that the browser is expected to keep in its cache; while relatively well deployed, the current approach has shown some strong limitations and the HTML and Web Applications Working Groups are considering a potentially major overhaul of the technology, likely based on <a data-featureid="serviceworker">ServiceWorker</a></li>
<li data-feature="Packaged Web App">a <a data-featureid="manifestjson">JSON-based manifest format</a> in development by the the <a href="http://www.w3.org/2008/webapps/">Web Apps Working Group</a>. The System Applications Working Group was building a <a data-featureid="runtime">runtime and security model</a> on top of that packaging, but is now instead defining an <a data-featureid="app-lifecycle">application lifecycle specification</a> based on top of Service Workers.</li>
</ul>
</section>
<section class="featureset">
<h2 id="Performance_.26_Optimization">12.
Performance & Optimization </h2>
<p>Due to their limited CPU, and more importantly to their limited battery, mobile devices require a lot of attention in terms of performance.</p>
<p data-feature="Timing hooks">The work started by the <a href="http://www.w3.org/2010/webperf/">Web Performance Working Group</a> on <cite><strong><a data-featureid="nav-timing">Navigation Timing</a></strong></cite>, <cite><strong><a data-featureid="res-timing">Resource Timing</a></strong></cite>, <cite><strong><a data-featureid="perf-timeline">Performance Timeline</a></strong></cite> and <cite><strong><a data-featureid="user-timing">User Timing</a></strong></cite>, gives tools to Web developers for optimizing their Web applications. </p>
<p data-feature="Network prioritization">Early work on a <cite><a data-featureid="lazy">Resource Priorities</a></cite> specification, part of the <a href="http://www.w3.org/2013/01/webperf.html">Web Performance Working Group new charter</a>, would let developers indicate which network requests should be prioritized.</p>
<p data-feature="Priority handling">The proposed work on <a data-featureid="setimmediate">Efficient Script Yielding</a> offers the opportunity to Web developers to use more efficiently asynchronous programming, but has so far gained very limited traction.</p>
<p><span data-feature="Page Visibility detection">The <a data-featureid="visibilitychange">API to determine whether a Web page is being displayed</a> (<cite><strong>Page Visibility API</strong></cite>) can also be used to adapt the usage of resources to the need of the Web application, for instance by reducing network activity when the page is minimized.</span> <span data-feature="Animation optimization">Likewise, the <a data-featureid="animation-timing">Timing control for script-based animations API</a> can help reduce the usage of resources needed for playing animations.</span></p>
<p data-feature="Threading">Beyond optimization of resources, the perceived reactivity of an application is also a critical aspect of the mobile user experience. The <strong>thread-like mechanism</strong> made possible via <cite><a data-featureid="webworkers">Web Workers</a></cite> allows keeping the user interface responsive by offloading the most resource-intensive operations into a background process.</p>
<p data-feature="Battery Status">The <a data-featureid="battery">battery API</a> allows adjusting the use of resources to the current level of power available in the battery of a mobile device.</p>
<p data-feature="Optimization Best Practices">The <cite><a data-featureid="mwabp">Mobile Web Application Best Practices</a></cite> provide general advice on how to build Web applications that work well on mobile devices, taking into account in particular the needs for optimization. The opportunity to update these best practices is <a href="https://github.com/w3c-webmob/mobile_best_practices">under discussion</a> in the <a href="http://www.w3.org/Mobile/IG/">Web and Mobile Interest Group</a>.</p>
</section>
<section>
<h2>Acknowledgments</h2>
<p>Thanks to Art Barstow, Anssi Kostiainen, Jo Rabin, Mounir Lamouri and Marcos Caceres for their contributions to this document.</p>
<p>This document is produced through the <a href="http://html5apps-project.eu/">HTML5Apps project</a>, funded by the European Union through the Seventh Framework Programme (FP7/2013-2015) under grant agreement n°611327 - HTML5 Apps.</p>
</section>
<div id="footer">
<address><a href="http://www.w3.org/People/Dom/">Dominique
Hazaël-Massieux</a> <<a href="mailto:[email protected]">[email protected]</a>> / <a href="https://twitter.com/dontcallmedom">@dontcallmedom</a><br/>
Last Modified: $Date: 2013-10-01 08:26:07 $</address>
</div>
</div>
<script src="js/generate.js"></script>
</body>
</html>