Created by Luca Greco @ ALCA Società Cooperativa
planning and brainstorming in open wikis, mailinglists, irc channels...
e.g. put together app structure mockups using plain
HTML, CSS and JS
e.g. introducing your own styles
and/or CSS Frameworks
(like Bootstrap, Foundation, TopCoat etc.)
e.g. refactoring into better designed app,
optionally using a Javascript Framework
(like Backbone, Ember, Argular etc.)
{
"name": "MyAppName",
"version": "1.7",
"launch_path": "/index.html",
"description": "...",
"developer": {
"name": "...",
"url": "..."
},
"locales": {
"en-US": {
"name": "...",
"description": "...",
},
},
"default_locale": "en-US",
"icons": {
"128": "/style/icons/Blank.png"
}
}
{
"name": "MyAppName",
"version": "1.7",
"launch_path": "/index.html",
"icons": {
"128": "/style/icons/Blank.png"
},
...,
}
launch_path, appcache_path, icons urls
are
https://myapp.com
http://localhost:9000
app://550e8400-e29b-41d4-a716-446655440000/
manifest.webapp
index.html
js/
app.js
css/
app.css
res/
...
vendor/
...
import SimpleHTTPServer
import SocketServer
SimpleHTTPServer.SimpleHTTPRequestHandler. \
extensions_map['.webapp'] = \
'application/x-web-app-manifest+json'
httpd = SocketServer.TCPServer(("", 3000), \
SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.serve_forever()
CACHE MANIFEST
# v1 2011-08-14
CACHE:
index.html
cache.html
style.css
image1.png
# Use from network if available
NETWORK:
network.html
# Fallback content
FALLBACK:
/ fallback.html
SimpleHTTPServer.SimpleHTTPRequestHandler. \
extensions_map['.appcache] = \
'text/cache-manifest'
{
"appcache_path": "/manifest.appcache",
...
}
ExpiresByType text/cache-manifest "access plus 0 seconds"
ExpiresByType application/x-web-app-manifest+json "access plus 0"
main Firefox OS Simulator 1.1 Dashboard Features are now included into the integrated Firefox DevTools
integrated ADB and Simulator Window components from Firefox OS Simulator 1.1 are now splitted into separated addons
Starting from Firefox 26 and Firefox OS 1.2, all integrated DevTool are now fully supported on a connected device or simulator.
Hosted App:
experimental WebAPIs available
Hosted App:
standard WebAPIs
Hosted App:
Packaged App:
all standard and experimental WebAPIs +
extended priviliged WebAPIs available
Priviliged and Certified Packaged App:
enforce a CSP (content security policy) by default:
...
"type": "privileged",
"permissions": {
"contacts": {
"description": "Required for ...",
"access": "readcreate"
},
"alarms": {
"description": "Required to ..."
}
}
...
if (typeof MozActivity == "function") {
...
} else {
console.log("FALLBACK: call WebActivity" +
" 'pick image'");
return;
}
var pick = new MozActivity({
name: "pick",
data: {
type: ["image/png",
"image/jpeg"]
}
});
WebActivities are mostly like Android Intents
pick.onsuccess = function () {
var img = document.createElement("img");
img.src = window.URL.
createObjectURL(this.result.blob);
var viewer = document.
querySelector("#image-viewer");
viewer.appendChild(img);
};
pick.onerror = function () { ... };
...
"activities": {
"pick": {
"filters": {
"type": ["image/*", "image/jpeg"]
},
"disposition": "inline",
"returnValue": true,
"href": "/index.html#pick"
},
...