SlideShare una empresa de Scribd logo
1 de 36
Giancarlo Orru
Scrivere webapp per Firefox OS
gengisca@yahoo.com - Investech-blue
Chi sono – Un 'frontendista' dal 1995
● 1996 WWW.ILMESSAGGERO.IT
● 1998 WWW.SFEXAMINER.COM (Intranet JS)
● 1999 WEBROOM – (CMS Grafico in DHTML / AJAX!)
● 2000-3 WWW.HSE.IT (TV COMMERCIALE)
● 2005 WWW.CDFLASH.COM
● 2007 WWW.TELSTRA.COM.AU (Mobile TV)
● 2008 Mobile TV e Audio streaming in Flashlite
● 2010 WWW.DU.AE (Mobile Social) - Wurfl
● 2012 WWW.ITVONLINE.NL (WEBTV di KPN)
● Colleziono siti (MOBYLE.IT, SHOPMETRO.IT, LAPUB.IT...)
● gengisca@yahoo.com
ROME 11-12 april 2014 – Giancarlo Orru
Il primi due miliardo di smartphones sono stati
costruiti con PalmOS, Symbian, IOS, Android...
Per i prossimi due... Firefox OS e' pronto!
ROME 11-12 april 2014 – Giancarlo Orru
Icone Browser Marketplace
Firefox OS – Schermate di esempio
Firefox OS - Devices
● Keon, Peak
● ZTE Open - FF OS 1.0.1 (Spagna)
● Alcatel OneTouch Fire - FF OS 1.1
● Alcatel OneTouch Fire S - FF OS 1.3 (Q3 2014)
● Geeksphone Revolution - FF OS 1.2 – Dual OS!
● Huawei Y300II - FF OS 1.1
● LG Fireweb - FF OS 1.1
● Alcatel OneTouch Fire 7 - FF OS 1.3
● APC PAPER (Cortex A9 800Mhz - 720P) Free 4 Bug solved
● Panasonic Smart TV (Q4 2014)
● Sony... gadgets?
ROME 11-12 april 2014 – Giancarlo Orru
MWC 2014
● Spreadtrum da 25$ (Cortex A5) EDGE
Per il mercato asiatico (India, Indonesia)
● Flame 4,5” NFC (for developers)
● Foxconn InFocus Tablet 10”
● VIA VIXEN Tablet 7”
ROME 11-12 april 2014 – Giancarlo Orru
Scrivere Webapp per IOS / Android...(Per non
parlare delle APP)
● HTML5
● Phonegap/Cordova
● Titanium Appcelerator
● 99 dollari all'anno (IOS)
● 60% degli sviluppatori IOS spende piu' di
quanto ricava (non calcolando il costo del
Mac...)
● Ma quante app vengono respinte?
● Vogliono subito una CC???
ROME 11-12 april 2014 – Giancarlo Orru
Scrivere Webapp per Firefox OS
● HTML5 e' 'nativo'!
● WebApi
● Web Activities
● Phonegap/Cordova
● Firefox OS Simulator, App manager,
Responsive Design View, Web Console,
Debugger, Monitor
● Tutto GRATIS!!!
ROME 11-12 april 2014 – Giancarlo Orru
App Manager - Firefox 26+
ROME 11-12 april 2014 – Giancarlo Orru
ROME 11-12 april 2014 – Giancarlo Orru
Firefox OS Architecture
● Linux AOSP (Android Open Source Project),
hardware abstraction layer , open souce
libraries – GONK
● Firefox OS application runtime, support for
HTML, CSS e JavaScript – Gecko!!!
● The user interface of the Firefox OS platform -
GAIA!!!
ROME 11-12 april 2014 – Giancarlo Orru
Packaged e Hosted apps
● Hosted app e' semplice, basta aggiungere il
manifest alla vostra webapp attuale!
Manutenzione semplice
Per farle funzionare offline si sfrutta l'appcache:
<html manifest="example.appcache">
● Packaged app – Tutte le risorse devono essere
incluse in uno zip
Risorse incluse devono essere poco
movimentate
ROME 11-12 april 2014 – Giancarlo Orru
App security e WebApi
● Web apps – Alarm, Music, Video, FM Radio,
Geolocation, Simple push, Storage (senza
limiti...)
● Privileged apps – Viste e approvate - Alarm
clock, calendar alarms, New email, incoming
SMS, Browser, Contacts, TCP Socket
● Certified apps (Solo per Operatori e OEM)–
Phone calls, bluetooth, camera, mobile
connection, settings, power management, sms,
wifi...
ROME 11-12 april 2014 – Giancarlo Orru
ROME 11-12 april 2014 – Giancarlo Orru
ROME 11-12 april 2014 – Giancarlo Orru
WWW.ANSA.ITWWW.ADNKRONOS.IT
ROME 11-12 april 2014 – Giancarlo Orru
ROME 11-12 april 2014 – Giancarlo Orru
Creazione di una hosted app a partire da una
Webapp gia' scritta in HTML, CSS, Javascript
con qualsiasi framework
● Scrivere il Manifest
● Tutto qui???
ROME 11-12 april 2014 – Giancarlo Orru
Esempio di Manifest
{
"name": "Meteo", "version": "1.0", "description": "A meteo app",
"launch_path": "/ff01/index.html",
"icons": { "60": "/icons/icon01_60.png", "128":
"/icons/icon01_128.png" },
"developer": { "name": "Giancarlo Orru", "url":
"http://www.mobyle.it" },
"permissions": { "geolocation": { "description": "Marking out
user location" } }
}
ROME 11-12 april 2014 – Giancarlo Orru
Esempio di WebApi – index.htm
<!DOCTYPE html>
<html><head>
<title>WebApi samples</title>
<meta name="viewport" content="width=device-width" />
</head>
<body>
<button id="vibrate">Vibrate</button><br/><br/>
<button id="battery">Battery</button><br/><br/>
<script src="app.js"></script>
</body>
</html>
File app.js
(function () {
var vibr = document.querySelector("#vibrate");
if (vibr) {
vibr.onclick = function () { window.navigator.vibrate(500); };
}
var batt = document.querySelector("#battery");
if (batt) {
batt.onclick = function () {
var battery = navigator.battery || navigator.mozBattery ||
navigator.webkitBattery;
alert("Battery status: " + battery.level * 100 + "%" + (battery.charging ? "
Battery is charging": "")); };
}
})();
Esempio di WebActivity tratto dal Boilerplate di Robert Nyman :
<!DOCTYPE html>
<html><head>
<title>Take a picture</title>
<meta name="viewport" content="width=device-width" />
</head>
<body>
<button id="pick-image">Take a picture</button>
<span id="image-presenter"></span>
<script src="app.js"></script>
</body>
</html>
ROME 11-12 april 2014 – Giancarlo Orru
File app.js:
(function () {
var pickImage = document.querySelector("#pick-image");
if (pickImage) {
pickImage.onclick = function () {
var pick = new MozActivity({
name: "pick",
data: {
type: ["image/png", "image/jpg", "image/jpeg"],
nocrop: true // don't allow the user to crop the image
}
});
ROME 11-12 april 2014 – Giancarlo Orru
pick.onsuccess = function () {
var img = document.createElement("img");
img.src = window.URL.createObjectURL(this.result.blob);
var imagePresenter = document.querySelector("#image-presenter");
var myImg = imagePresenter.appendChild(img);
imagePresenter.style.display = "block";
myImg.style.width = "95%";
};
pick.onerror = function () {
console.log("Can't view the image");
};
};
}
})();
ROME 11-12 april 2014 – Giancarlo Orru
File manifest.webapp:
{ "name": "FFOS",
"description": "First FireFox OS APP!",
"launch_path": "/pct/index.htm",
"developer":
{ "name": "Gengisca", "url": "http://www.mobyle.it" },
"icons":
{ "32": "/pct/logo32.png",
"60": "/pct/logo60.png",
"90": "/pct/logo90.png",
"120": "/pct/logo120.png",
"128": "/pct/logo128.png",
"256": "/pct/logo256.png" },
"default_locale": "en" }
ROME 11-12 april 2014 – Giancarlo Orru
Manifest.appcache se device e' offline
● CACHE MANIFEST
# Build 2014-02-15
CACHE:
index.htm
js/app.js
NETWORK:
*
● www.html5rocks.com/en/tutorials/appcache/beginner
Boilerplate completo di Robert Nyman:
● https://github.com/robnyman/Firefox-OS-Boilerplate-App
● http://hacks.mozilla.org/2013/01/introducing-the-
firefox-os-boilerplate-app/
Altri esempi 'basic':
Addy Osmani – The Nitty Gritty
● http://thenittygritty.co/ffos-apps
Rob Lauer - Adobe
● http://www.adobe.com/devnet/html5/articles/writing-
your-first-firefox-os-app.html
ROME 11-12 april 2014 – Giancarlo Orru
Responsive apps
● Layout pattern
● Media Query
<link rel="stylesheet" media="only screen and (max-width: 350px)" href="320.css">
<link rel="stylesheet" media="only screen and (min-width: 351px) and (max-width: 719px)"
href="480.css">
<link rel="stylesheet" media="only screen and (min-width: 720px) and (max-width: 1079px)"
href="980.css">
● viewport!:
<meta name="viewport" content="width=device-width, user-scalable=no">
E se lo vogliamo compatibile con il vecchio
BlackBerry? Responsive server – RESS (Wurfl,
MobileAware, Antenna...)
ROME 11-12 april 2014 – Giancarlo Orru
Responsive design, device detection, o
entrambi?
● Firefox OS non viene riconosciuto come mobile
device dai maggiori siti italiani!!!
● Responsive Server – RESS – Il server genera il
codice a seconda dello 'User-Agent'
ROME 11-12 april 2014 – Giancarlo Orru
User Agent strings
Chrome UA: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/33.0.1750.154 Safari/537.36
Safari UA: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X)
AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d
Safari/8536.25
Opera UA: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/33.0.1750.154 Safari/537.36 OPR/20.0.1387.82
Internet Explorer 11 UA: Mozilla/5.0 (Windows NT 6.1; Trident/7.0;
rv:11.0) like Gecko
FireFox UA:Mozilla/5.0 (Windows NT 6.0; rv:28.0) Gecko/20100101
Firefox/28.0
Alcatel UA: Mozilla/5.0 (Mobile; ALCATELOneTouch4012X; rv:18.1)
Gecko/18.1 Firefox/18.1
ROME 11-12 april 2014 – Giancarlo Orru
Scrivere una animazione o un gioco in HTML5
● CSS semplice, tutti i browser lo gestiscono al
meglio
● Canvas – hardware acceleration – Parecchi
giochi HTML5 lo utilizzano
● SVG Veloce se si utilizza l'object model
direttamente, puo' confondere le idee, non puoi
usare bitmap direttamente, ma effetti speciali!!!
● Webgl (da firefox 27 anche debugger)
requestAnimationFrame e non setInterval
addEventListener e non onEvent
ROME 11-12 april 2014 – Giancarlo Orru
Mozilla Persona
● http://www.mozilla.org/en-US/persona/
Validazione delle app
● https://marketplace.firefox.com/developers/validator
Distribuzione delle app
● https://marketplace.firefox.com/developers/docs/deploy
ROME 11-12 april 2014 – Giancarlo Orru
Libri
● Quick Guide For Firefox OS App Development
● Firefox OS for Activists
● Beginning Firefox OS HTML5 Game Programming
Links
● https://developer.mozilla.org
● https://developer.mozilla.org/en-US/Firefox_OS
● https://developer.mozilla.org/en-US/docs/Web
● http://buildingfirefoxos.com
● https://github.com/mozilla-b2g
ROME 11-12 april 2014 – Giancarlo Orru
HTML5TEST.COM
ROME 11-12 april 2014 – Giancarlo Orru
Scrivere Webapp per Firefox OS - Orru
Scrivere Webapp per Firefox OS - Orru

Más contenido relacionado

Similar a Scrivere Webapp per Firefox OS - Orru

Myths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsMyths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsDevFest DC
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Webmasuland
 
Opera and the Open Web platform
Opera and the Open Web platformOpera and the Open Web platform
Opera and the Open Web platformAndreas Bovens
 
Responsive vs Adaptive Web Design - What about Device Channels?
Responsive vs Adaptive Web Design - What about Device Channels?Responsive vs Adaptive Web Design - What about Device Channels?
Responsive vs Adaptive Web Design - What about Device Channels?Stefan Bauer
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do ThatNathan Smith
 
Firefox OS - A (web) developers dream - muxCamp 2014
Firefox OS - A (web) developers dream - muxCamp 2014Firefox OS - A (web) developers dream - muxCamp 2014
Firefox OS - A (web) developers dream - muxCamp 2014Carsten Sandtner
 
Making your site mobile-friendly / RIT++
Making your site mobile-friendly / RIT++Making your site mobile-friendly / RIT++
Making your site mobile-friendly / RIT++Patrick Lauke
 
Firefox OS Workshop @ Serbia & Montenegro
Firefox OS Workshop @ Serbia & MontenegroFirefox OS Workshop @ Serbia & Montenegro
Firefox OS Workshop @ Serbia & MontenegroJan Jongboom
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchAlexander Wilhelm
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Frédéric Harper
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginnersrajkamaltibacademy
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010alunny
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkTroy Miles
 
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...Jan Jongboom
 

Similar a Scrivere Webapp per Firefox OS - Orru (20)

Web app
Web appWeb app
Web app
 
Myths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsMyths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really Is
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
 
Opera and the Open Web platform
Opera and the Open Web platformOpera and the Open Web platform
Opera and the Open Web platform
 
Web app
Web appWeb app
Web app
 
Responsive vs Adaptive Web Design - What about Device Channels?
Responsive vs Adaptive Web Design - What about Device Channels?Responsive vs Adaptive Web Design - What about Device Channels?
Responsive vs Adaptive Web Design - What about Device Channels?
 
DDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su LotusDDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su Lotus
 
Echo HTML5
Echo HTML5Echo HTML5
Echo HTML5
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
Firefox OS - A (web) developers dream - muxCamp 2014
Firefox OS - A (web) developers dream - muxCamp 2014Firefox OS - A (web) developers dream - muxCamp 2014
Firefox OS - A (web) developers dream - muxCamp 2014
 
HTML 5
HTML 5HTML 5
HTML 5
 
The future is hybrid
The future is hybridThe future is hybrid
The future is hybrid
 
Making your site mobile-friendly / RIT++
Making your site mobile-friendly / RIT++Making your site mobile-friendly / RIT++
Making your site mobile-friendly / RIT++
 
Firefox OS Workshop @ Serbia & Montenegro
Firefox OS Workshop @ Serbia & MontenegroFirefox OS Workshop @ Serbia & Montenegro
Firefox OS Workshop @ Serbia & Montenegro
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha Touch
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
 

Más de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Más de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Último

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Último (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Scrivere Webapp per Firefox OS - Orru

  • 1. Giancarlo Orru Scrivere webapp per Firefox OS gengisca@yahoo.com - Investech-blue
  • 2. Chi sono – Un 'frontendista' dal 1995 ● 1996 WWW.ILMESSAGGERO.IT ● 1998 WWW.SFEXAMINER.COM (Intranet JS) ● 1999 WEBROOM – (CMS Grafico in DHTML / AJAX!) ● 2000-3 WWW.HSE.IT (TV COMMERCIALE) ● 2005 WWW.CDFLASH.COM ● 2007 WWW.TELSTRA.COM.AU (Mobile TV) ● 2008 Mobile TV e Audio streaming in Flashlite ● 2010 WWW.DU.AE (Mobile Social) - Wurfl ● 2012 WWW.ITVONLINE.NL (WEBTV di KPN) ● Colleziono siti (MOBYLE.IT, SHOPMETRO.IT, LAPUB.IT...) ● gengisca@yahoo.com ROME 11-12 april 2014 – Giancarlo Orru
  • 3. Il primi due miliardo di smartphones sono stati costruiti con PalmOS, Symbian, IOS, Android... Per i prossimi due... Firefox OS e' pronto! ROME 11-12 april 2014 – Giancarlo Orru
  • 4. Icone Browser Marketplace Firefox OS – Schermate di esempio
  • 5. Firefox OS - Devices ● Keon, Peak ● ZTE Open - FF OS 1.0.1 (Spagna) ● Alcatel OneTouch Fire - FF OS 1.1 ● Alcatel OneTouch Fire S - FF OS 1.3 (Q3 2014) ● Geeksphone Revolution - FF OS 1.2 – Dual OS! ● Huawei Y300II - FF OS 1.1 ● LG Fireweb - FF OS 1.1 ● Alcatel OneTouch Fire 7 - FF OS 1.3 ● APC PAPER (Cortex A9 800Mhz - 720P) Free 4 Bug solved ● Panasonic Smart TV (Q4 2014) ● Sony... gadgets? ROME 11-12 april 2014 – Giancarlo Orru
  • 6. MWC 2014 ● Spreadtrum da 25$ (Cortex A5) EDGE Per il mercato asiatico (India, Indonesia) ● Flame 4,5” NFC (for developers) ● Foxconn InFocus Tablet 10” ● VIA VIXEN Tablet 7” ROME 11-12 april 2014 – Giancarlo Orru
  • 7. Scrivere Webapp per IOS / Android...(Per non parlare delle APP) ● HTML5 ● Phonegap/Cordova ● Titanium Appcelerator ● 99 dollari all'anno (IOS) ● 60% degli sviluppatori IOS spende piu' di quanto ricava (non calcolando il costo del Mac...) ● Ma quante app vengono respinte? ● Vogliono subito una CC??? ROME 11-12 april 2014 – Giancarlo Orru
  • 8. Scrivere Webapp per Firefox OS ● HTML5 e' 'nativo'! ● WebApi ● Web Activities ● Phonegap/Cordova ● Firefox OS Simulator, App manager, Responsive Design View, Web Console, Debugger, Monitor ● Tutto GRATIS!!! ROME 11-12 april 2014 – Giancarlo Orru
  • 9. App Manager - Firefox 26+ ROME 11-12 april 2014 – Giancarlo Orru
  • 10. ROME 11-12 april 2014 – Giancarlo Orru
  • 11. Firefox OS Architecture ● Linux AOSP (Android Open Source Project), hardware abstraction layer , open souce libraries – GONK ● Firefox OS application runtime, support for HTML, CSS e JavaScript – Gecko!!! ● The user interface of the Firefox OS platform - GAIA!!! ROME 11-12 april 2014 – Giancarlo Orru
  • 12. Packaged e Hosted apps ● Hosted app e' semplice, basta aggiungere il manifest alla vostra webapp attuale! Manutenzione semplice Per farle funzionare offline si sfrutta l'appcache: <html manifest="example.appcache"> ● Packaged app – Tutte le risorse devono essere incluse in uno zip Risorse incluse devono essere poco movimentate ROME 11-12 april 2014 – Giancarlo Orru
  • 13. App security e WebApi ● Web apps – Alarm, Music, Video, FM Radio, Geolocation, Simple push, Storage (senza limiti...) ● Privileged apps – Viste e approvate - Alarm clock, calendar alarms, New email, incoming SMS, Browser, Contacts, TCP Socket ● Certified apps (Solo per Operatori e OEM)– Phone calls, bluetooth, camera, mobile connection, settings, power management, sms, wifi... ROME 11-12 april 2014 – Giancarlo Orru
  • 14. ROME 11-12 april 2014 – Giancarlo Orru
  • 15. ROME 11-12 april 2014 – Giancarlo Orru WWW.ANSA.ITWWW.ADNKRONOS.IT
  • 16. ROME 11-12 april 2014 – Giancarlo Orru
  • 17. ROME 11-12 april 2014 – Giancarlo Orru
  • 18. Creazione di una hosted app a partire da una Webapp gia' scritta in HTML, CSS, Javascript con qualsiasi framework ● Scrivere il Manifest ● Tutto qui??? ROME 11-12 april 2014 – Giancarlo Orru
  • 19. Esempio di Manifest { "name": "Meteo", "version": "1.0", "description": "A meteo app", "launch_path": "/ff01/index.html", "icons": { "60": "/icons/icon01_60.png", "128": "/icons/icon01_128.png" }, "developer": { "name": "Giancarlo Orru", "url": "http://www.mobyle.it" }, "permissions": { "geolocation": { "description": "Marking out user location" } } } ROME 11-12 april 2014 – Giancarlo Orru
  • 20. Esempio di WebApi – index.htm <!DOCTYPE html> <html><head> <title>WebApi samples</title> <meta name="viewport" content="width=device-width" /> </head> <body> <button id="vibrate">Vibrate</button><br/><br/> <button id="battery">Battery</button><br/><br/> <script src="app.js"></script> </body> </html>
  • 21. File app.js (function () { var vibr = document.querySelector("#vibrate"); if (vibr) { vibr.onclick = function () { window.navigator.vibrate(500); }; } var batt = document.querySelector("#battery"); if (batt) { batt.onclick = function () { var battery = navigator.battery || navigator.mozBattery || navigator.webkitBattery; alert("Battery status: " + battery.level * 100 + "%" + (battery.charging ? " Battery is charging": "")); }; } })();
  • 22. Esempio di WebActivity tratto dal Boilerplate di Robert Nyman : <!DOCTYPE html> <html><head> <title>Take a picture</title> <meta name="viewport" content="width=device-width" /> </head> <body> <button id="pick-image">Take a picture</button> <span id="image-presenter"></span> <script src="app.js"></script> </body> </html> ROME 11-12 april 2014 – Giancarlo Orru
  • 23. File app.js: (function () { var pickImage = document.querySelector("#pick-image"); if (pickImage) { pickImage.onclick = function () { var pick = new MozActivity({ name: "pick", data: { type: ["image/png", "image/jpg", "image/jpeg"], nocrop: true // don't allow the user to crop the image } }); ROME 11-12 april 2014 – Giancarlo Orru
  • 24. pick.onsuccess = function () { var img = document.createElement("img"); img.src = window.URL.createObjectURL(this.result.blob); var imagePresenter = document.querySelector("#image-presenter"); var myImg = imagePresenter.appendChild(img); imagePresenter.style.display = "block"; myImg.style.width = "95%"; }; pick.onerror = function () { console.log("Can't view the image"); }; }; } })(); ROME 11-12 april 2014 – Giancarlo Orru
  • 25. File manifest.webapp: { "name": "FFOS", "description": "First FireFox OS APP!", "launch_path": "/pct/index.htm", "developer": { "name": "Gengisca", "url": "http://www.mobyle.it" }, "icons": { "32": "/pct/logo32.png", "60": "/pct/logo60.png", "90": "/pct/logo90.png", "120": "/pct/logo120.png", "128": "/pct/logo128.png", "256": "/pct/logo256.png" }, "default_locale": "en" } ROME 11-12 april 2014 – Giancarlo Orru
  • 26. Manifest.appcache se device e' offline ● CACHE MANIFEST # Build 2014-02-15 CACHE: index.htm js/app.js NETWORK: * ● www.html5rocks.com/en/tutorials/appcache/beginner
  • 27. Boilerplate completo di Robert Nyman: ● https://github.com/robnyman/Firefox-OS-Boilerplate-App ● http://hacks.mozilla.org/2013/01/introducing-the- firefox-os-boilerplate-app/ Altri esempi 'basic': Addy Osmani – The Nitty Gritty ● http://thenittygritty.co/ffos-apps Rob Lauer - Adobe ● http://www.adobe.com/devnet/html5/articles/writing- your-first-firefox-os-app.html ROME 11-12 april 2014 – Giancarlo Orru
  • 28. Responsive apps ● Layout pattern ● Media Query <link rel="stylesheet" media="only screen and (max-width: 350px)" href="320.css"> <link rel="stylesheet" media="only screen and (min-width: 351px) and (max-width: 719px)" href="480.css"> <link rel="stylesheet" media="only screen and (min-width: 720px) and (max-width: 1079px)" href="980.css"> ● viewport!: <meta name="viewport" content="width=device-width, user-scalable=no"> E se lo vogliamo compatibile con il vecchio BlackBerry? Responsive server – RESS (Wurfl, MobileAware, Antenna...) ROME 11-12 april 2014 – Giancarlo Orru
  • 29. Responsive design, device detection, o entrambi? ● Firefox OS non viene riconosciuto come mobile device dai maggiori siti italiani!!! ● Responsive Server – RESS – Il server genera il codice a seconda dello 'User-Agent' ROME 11-12 april 2014 – Giancarlo Orru
  • 30. User Agent strings Chrome UA: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36 Safari UA: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25 Opera UA: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36 OPR/20.0.1387.82 Internet Explorer 11 UA: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko FireFox UA:Mozilla/5.0 (Windows NT 6.0; rv:28.0) Gecko/20100101 Firefox/28.0 Alcatel UA: Mozilla/5.0 (Mobile; ALCATELOneTouch4012X; rv:18.1) Gecko/18.1 Firefox/18.1 ROME 11-12 april 2014 – Giancarlo Orru
  • 31. Scrivere una animazione o un gioco in HTML5 ● CSS semplice, tutti i browser lo gestiscono al meglio ● Canvas – hardware acceleration – Parecchi giochi HTML5 lo utilizzano ● SVG Veloce se si utilizza l'object model direttamente, puo' confondere le idee, non puoi usare bitmap direttamente, ma effetti speciali!!! ● Webgl (da firefox 27 anche debugger) requestAnimationFrame e non setInterval addEventListener e non onEvent ROME 11-12 april 2014 – Giancarlo Orru
  • 32. Mozilla Persona ● http://www.mozilla.org/en-US/persona/ Validazione delle app ● https://marketplace.firefox.com/developers/validator Distribuzione delle app ● https://marketplace.firefox.com/developers/docs/deploy ROME 11-12 april 2014 – Giancarlo Orru
  • 33. Libri ● Quick Guide For Firefox OS App Development ● Firefox OS for Activists ● Beginning Firefox OS HTML5 Game Programming Links ● https://developer.mozilla.org ● https://developer.mozilla.org/en-US/Firefox_OS ● https://developer.mozilla.org/en-US/docs/Web ● http://buildingfirefoxos.com ● https://github.com/mozilla-b2g ROME 11-12 april 2014 – Giancarlo Orru
  • 34. HTML5TEST.COM ROME 11-12 april 2014 – Giancarlo Orru