SlideShare a Scribd company logo
EMPOWERING THE

MOBILE WEB
Chris Mills // Mozilla cmills@mozilla.com // @chrisdavidmills
don’t stress about taking notes:
๏ These slides are all at slideshare.net/chrisdavidmills
๏ developer.mozilla.org
๏ @chrisdavidmills
๏ cmills@mozilla.com
๏ #mdn irc channel on mozilla irc
๏ dev-mdc@lists.mozilla.org mailing list
๏ heavy metal drummer turned web nerd
๏ tech writer @ mozilla
๏ web tinkerer (HTML, CSS, JS)
๏ accessibility whiner
๏ educator
who am i?
mdn!!
what is THE

MOBILE WEB?

Recommended for you

High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)

The document summarizes techniques for improving JavaScript performance in web applications. It discusses how JavaScript execution blocks the browser UI thread, leading to unresponsive user experiences if scripts run for too long. It then provides recommendations to limit JavaScript execution times to under 50ms and describes load time techniques like placing scripts at the bottom of the page, combining files, and loading scripts dynamically or deferring their execution to improve page load performance.

amazonjavascriptperformance
React & The Art of Managing Complexity
React &  The Art of Managing ComplexityReact &  The Art of Managing Complexity
React & The Art of Managing Complexity

React is a UI library that is changing the way web applications are written. While there are many benefits to using React, managing an application's complexity as it scales is one of the most powerful.

reactjsjavascript
Building Cross Platform Apps with Electron
Building Cross Platform Apps with ElectronBuilding Cross Platform Apps with Electron
Building Cross Platform Apps with Electron

Electron is a fantastic tool for creating cross-platform apps with HTML, CSS, and JavaScript that look and feel relatively native to the hosted Platform. In this presentation I'll give a quick overview of what's possible.

cross platformprogrammingjavascript
what is the mobile web?
wap
๏ (blarrrgh, awful...)
what is the mobile web?
the web for mobile phones
๏ real mobile browsers
๏ separate web sites for mobiles
๏ lots of ua sniffing crimes
what is the mobile web?
the web as it is experienced on mobiles/tablets/etc.
๏ more thought given to ux; to context
๏ progressive enhancement
๏ feature detection
๏ responsive
what is the mobile web?
the web while you’re on the move
๏ geolocation
๏ offline data storage

Recommended for you

Getting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workersGetting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workers

This document introduces web workers, which allow JavaScript code to perform processor-intensive calculations without blocking the user interface (UI) thread. Web workers allow web pages to run multiple scripts simultaneously, improving performance for tasks like live syntax highlighting, crunching large amounts of data, and smooth animations. They work by executing scripts in background threads separate from the main script, so the UI thread is not blocked. Developers create and communicate with worker threads to offload processing work from the UI thread.

webworkersweb workershtml5
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack

Webpack tutorial with tips for Symfony users. Topics covered include: current frontend trends, setup, loaders, dev tools, optimization in production, bundle splitting and tips and tricks for using webpack with existing projects. Symfony Munich Meetup 2016.

webpackfrontendsymfony
Web workers
Web workersWeb workers
Web workers

This document discusses web workers, which allow JavaScript to execute tasks in background threads apart from the main execution thread. It covers the need for web workers due to JavaScript's single-threaded nature. There are two types of web workers - dedicated workers which are linked to a single script, and shared workers which can be accessed by multiple scripts. The document outlines the web workers API, how to communicate with workers using message passing, and provides examples of dedicated and shared workers. It also discusses browser support for web workers and how to check for support.

what is the mobile web?
web technologies providing “native” capabilities
๏ installable apps
๏ control over device hardware and key services
๏ app ecosystem/marketplace
๏ fully functional offline apps
๏ high fps performance
what’s the

problem?
web versus native, the age-old struggle
the usual arguments
native is better?
๏ faster?
๏ more integrated, consistent experience?
๏ better developer ecosystem?
๏ more secure?

Recommended for you

Responsive interfaces
Responsive interfacesResponsive interfaces
Responsive interfaces

The document discusses responsive interfaces and how to keep the user interface responsive when executing JavaScript. It explains that the UI thread is used for both drawing updates and running JavaScript, so no updates can happen while JavaScript runs. It recommends keeping JavaScript execution under 50ms to avoid unresponsiveness, and describes using timers and web workers to split processing over multiple ticks to keep the UI responsive.

Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery Plugins

The document discusses lessons learned from examining popular jQuery plugins. It summarizes 30 top plugins, describing why each was created and how it grew. Key takeaways are that authors build plugins to make something better, for fun/exploration, or client needs. Managing features and user feedback is challenging. The best plugins have great demos, documentation, browser support testing, and are fun. The author is available for questions.

pluginsjquery
JavaScript Web Workers
JavaScript Web WorkersJavaScript Web Workers
JavaScript Web Workers

An introduction about JavaScript web workers I gave at BerlinJS on the 18th of July 2013. It introduces the concept of web workers for simple parallel processing in client side JavaScript.

web workerberlinjshtml5
the usual arguments
๏ web sites accessing other tabs or apps?
๏ web sites accessing

camera

contacts

e-mail?
solutions,

moz style
solutions
we’ve been working hard on this at mozilla
๏ app ecosystem
๏ firefox os
๏ apis
๏ developer experience and tools
๏ performance
app ecosystem

Recommended for you

Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications

Progressive Web Applications (PWA) is a comprehensive term describing web applications that implement a base set of browser platform features like HTTPS, Web Manifest and Service Workers. But it bleeds beyond the scope of an application's code because browsers are enabling qualified web applications to offer the same user experiences native application enjoy. This includes prominent home screen placement, push notifications, eliminated browser chrome and app store placement. Become a Progressive Web App expert with my course: Progressive Web Apps (PWA) Beginner to Expert -> http://PWACourse.com

businesstechnologyprogressive web applications
PWA 與 Service Worker
PWA 與 Service WorkerPWA 與 Service Worker
PWA 與 Service Worker

2017/01/23【F2E&RGBA Meetup】所分享的內容 簡介: PWA (Progressive Web App) 是 Google 在 2015 年所提出的概念,2016 年我們開始看到許多 PWA 應用像是 The Washington Post、Flipkart、Gmail、AliExpress、Wikipedia、Flipboard、Booking 等實務案例,本次分享將介紹 PWA 與 HTML5 Offline API 搭配 Service Worker,讓我們的網站在離線的時候還能夠進行瀏覽,打造出更好的用戶體驗。 活動網址: http://f2e.kktix.cc/events/f2e6-56d17c-0f9e5b-3997b7-a9203f-d684fd-886f38

pwaprogressive web appservice worker
High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010

For much of its existence, JavaScript has been slow. No one complained until developers created complex web applications with thousands of lines of JavaScript code. Although newer JavaScript engines have improved the situation, there's still a lot to understand about what makes JavaScript slow and what you can do to speed up your code.

momjavascriptperformance
installable apps
not a new phenomenon, but...
๏ pretty recent concept for the web
๏ manifest file defines app (manifest.webapp)
๏ installation controlled by app installation and management apis
{
"version": "0.1",
"name": "To-do alarms",
"description": "My awesome open web app",
"launch_path": "/index.html",
"icons": {
"128": "/img/icon-128.png"
},
"developer": {
"name": "Chris Mills",
"url": "http://yourawesomeapp.com"
},
"locales": {
"es": {
"description": "Su nueva aplicación impresionante Open Web",
"developer": {
"url": "http://yourawesomeapp.com"
}
}, manifest example
var manifest_url = location.href.substring(0,
location.href.lastIndexOf("/")) + "/manifest.webapp";
function install() {
// install the app
var install = navigator.mozApps.install(manifest_url);
install.onsuccess = function(data) {
// App is installed, do something if you like
};
install.onerror = function() {
// App wasn't installed, info is in
// install.error.name
alert(install.error.name);
};
};
installation example
app types
Apps can be:
๏ hosted: just like a normal web site, but with a manifest and install
functionality
๏ packaged: zipped up, hosted somewhere (like the firefox
marketplace)

Recommended for you

Chrome enchanted 2015
Chrome enchanted 2015Chrome enchanted 2015
Chrome enchanted 2015

This document contains slides from a presentation on Polymer and modern web APIs. The slides discuss how Polymer uses web components to build reusable custom elements, and how this allows for component-based development. They provide examples of popular elements like <paper-tabs> and <core-toolbar> that are used as building blocks. The slides also showcase several production uses of Polymer at Google scale, including the Google Santa Tracker application. They emphasize how Polymer leverages modern web platform APIs to build fast, modular, and powerful applications.

googlechromeserviceworker
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...

This document discusses how to build rich mobile user experiences using web standards like HTML5, CSS3, and JavaScript. It covers various HTML5 features such as new elements, forms, video/audio, geolocation and caching. It also discusses CSS techniques including transforms, transitions, animations and vendor-specific properties. Challenges with fixed positioning, touch events and performance are addressed. The document promotes building web apps that are native-like using frameworks like jQTouch and Sencha Touch.

htmlipadframeworks
Don't Over-React - just use Vue!
Don't Over-React - just use Vue!Don't Over-React - just use Vue!
Don't Over-React - just use Vue!

Vue.js is a JavaScript framework that provides two-way binding between DOM and JavaScript, a template language for declarative rendering, and supports installation via npm, direct download, or a script tag. It allows defining where rendering will occur, setting up data, and rendering data to the DOM. Components provide reusability through templates, logic, and styles. Additional features include routing, state management with Vuex, and use of the Vue CLI for scaffolding single file components.

javascriptvuejs
app stores
you are free to distribute your apps how you like
๏ marketplace.firefox.com
๏ team of reviewers verify apps before they are accepted
๏ you can also host your own apps
๏ or set up your own marketplace
app payments
now you can charge money for web apps
๏ payments api (mozpay) that uses the bango payments provider
๏ receipt verification to make sure payments are completed
๏ in-app payments also available
web runtime
web rt allows installable apps to work on other platforms
๏ apk wrapper for android apps, which includes native equivalents
where possible
๏ similar native wrappers for desktop platforms coming up
๏ firefox marketplace/Firefox will generate these
firefox os

Recommended for you

Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools

Bower, Grunt, and RequireJS are just a few tools that have been re-shaping the frontend development world, replacing cluttered script tags and server-side build solutions with a sophisticated, but sometimes complex approach to dependency management and module loading. In this talk, we'll put on our trendy frontend developer hat and find out how these tools work and how they differ from what we might be used to. Most important, we'll see how using tools like this might look in Symfony2 and how our application can be a friendly place for a frontend guy/gal.

bowerjavascriptgrunt
GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA
GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELAGOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA
GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA

El documento discute los beneficios del uso del gobierno electrónico para mejorar la gestión pública en Venezuela mediante el uso de las tecnologías de información y comunicación (TICs). El gobierno electrónico puede utilizarse para controlar a los entes del estado, aumentar la transparencia y eficiencia de la gestión pública, y reducir la brecha informativa entre el gobierno y la sociedad.

"basic of Costing" hearing session
"basic of Costing" hearing session"basic of Costing" hearing session
"basic of Costing" hearing session

we'll feedback to this lesson, you can study this easily. we expect your actions

firefox os!
our mobile platform
๏ totally built on open web technologies
๏ mostly standards
๏ some are new inventions, with standardization being worked on
๏ designed for low power devices
successes so far
lots of success so far:
๏ 4 hardware partners
๏ 16 launches in 15 countries
๏ 30% market share with TEF in Uruguay; 12% market share with TEF
in Colombia
๏ vibrant developer community
๏ developer preview devices available
architecture
three main layers
๏ gonk: linux kernel plus hardware abstraction layer
๏ gecko: entire system runs on our rendering engine
๏ gaia: ui plus default system apps
architecture
everything runs in gecko
๏ each app runs in an iframe, hanging off main process
๏ this enforces cross app security (sandbox)
๏ as does api permissions system (see later)
๏ oom errors handled via a priority system

Recommended for you

Book Paula S.
Book Paula S.Book Paula S.
Book Paula S.

Book

graphic design
Apresentações: o que os melhores apresentadores sabem, fazem e falam
Apresentações: o que os melhores apresentadores sabem, fazem e falamApresentações: o que os melhores apresentadores sabem, fazem e falam
Apresentações: o que os melhores apresentadores sabem, fazem e falam

O documento fornece dicas sobre como melhorar as habilidades de apresentação, incluindo como entender a plateia, desenvolver uma história envolvente, usar slides de forma eficaz e lidar com a tecnologia. É dividido em cinco partes que abordam mudanças nas expectativas do público, como se preparar, ferramentas do apresentador, o papel da tecnologia e como se tornar um apresentador excepcional.

falar em públicoapresentações empresariasnegócios
Ecuaciones de tercer grado
Ecuaciones de tercer gradoEcuaciones de tercer grado
Ecuaciones de tercer grado

1) Se copian los términos de la ecuación de tercer grado en una primera fila. 2) En una segunda fila se anotan los posibles divisores del término independiente. 3) Se multiplica fila por fila y se suman los términos correspondientes, anotando el resultado en la fila inferior. 4) Si el último término da cero, se han encontrado las raíces; de lo contrario, se prueban otros divisores hasta hallar las raíces.

apis
apis!!!
we want to control everything from the web
๏ so we’re creating apis to handle access to device hardware, system
functions, etc.
๏ security handled by permissions, in the manifest
api permissions
different apis have different permission levels:
๏ standard apis can be accessed by any app
๏ privileged apis can only be used in a packaged, verified apps (e.g.
contacts, device storage, keyboard)
๏ certified apis can only be used by vendor-installed apps (e.g.
camera, sms, dialer, bluetooth)
var pick = new MozActivity({
name: "pick",
data: {
type: ["image/png", "image/jpg", "image/jpeg"]


}
});
web activities (intents)

Recommended for you

Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 MinutesVirginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes

Hadi Aboukhater talks about a startup company hailing out of Alexandria, Virginia, MunchQuick. This company delivers fresh meals under $6 to Washington, DC residence.

startupstartupsbusiness development
5 BS Facts About Data Privacy Everyone Thinks Are True
5 BS Facts About Data Privacy Everyone Thinks Are True5 BS Facts About Data Privacy Everyone Thinks Are True
5 BS Facts About Data Privacy Everyone Thinks Are True

The document summarizes a presentation on common misconceptions about data privacy. It identifies 5 myths ("BS Facts") that are widely believed but untrue. These myths claim that privacy policies only apply to data, a single policy can cover all data, anonymized data protects privacy, and privacy is dead. The presentation provides corrections to these myths and outlines a 5-step action plan for consumers, private sector, constituents, and public sector to improve data privacy practices.

socialshakeup
Travel pdf
Travel pdfTravel pdf
Travel pdf

travel

travel
web activities
pick.onsuccess = function () {
// Create image and set the returned blob as the src
var img = document.createElement("img");
img.src = window.URL.createObjectURL(this.result.blob);
// Present that image in your app
var imagePresenter = document.querySelector("#image-presenter");
imagePresenter.appendChild(img);
};
pick.onerror = function () {
// If an error occurred or the user canceled the activity
alert("Can't view the image!");
};
web activities
var img = '/to-do-notifications/img/icon-128.png';
var text = 'HEY! Your task "' + title + '" is now overdue.';
var notification = new Notification('To do list', { body: text, icon:
img });
notification
!
var myAlarmDate = new Date(month.value + " " + day.value + ", " +
year.value + " " + hours.value + ":" + minutes.value + ":00");
!
var data = {
task: title.value
}
!
var request = navigator.mozAlarms.add(myAlarmDate, "ignoreTimezone",
data);
!
request.onsuccess = function () {
console.log("Alarm successfully scheduled");
var alarmRequest = navigator.mozAlarms.getAll();
alarmRequest.onsuccess = function() {
newAlarmId = this.result[(this.result.length)-1].id;
}
};
alarm

Recommended for you

Puentes colgantes
Puentes colgantesPuentes colgantes
Puentes colgantes

Un puente colgante se sostiene mediante cables de acero que forman un arco invertido, del cual cuelga el tablero a través de tirantes verticales. Las fuerzas principales son la tracción en los cables y la compresión en los pilares, lo que permite que el puente permanezca estable y seguro a pesar de las cargas y fuerzas que soporta.

Open House 2010
Open House 2010Open House 2010
Open House 2010

Mosaicos Andinos los invita a participar de este evento publico para ser parte del elenco de folclore peruano. Este sábado 29 desde las 5:00 p.m.. Los esperamos con los brazos abiertos, bienvenidos.

new yorkmosaicos andinosfolklore
Pautas para la gestión de los árbitros 2
Pautas para la gestión de los árbitros 2Pautas para la gestión de los árbitros 2
Pautas para la gestión de los árbitros 2

Este documento ofrece cinco pautas para que los entrenadores gestionen de forma inteligente a los árbitros durante los partidos: 1) Conocer bien el reglamento, 2) Mostrar empatía, 3) Controlar las emociones, 4) Obtener información sobre el árbitro, y 5) Observar su lenguaje corporal. También sugiere que en lugar de recriminar los errores del árbitro, se les de ánimos, para otorgarles confianza y reducir sus errores.

navigator.mozSetMessageHandler("alarm", function (alarm) {
// only launch a notification if the Alarm is of the right type for this
app
if(alarm.data.task) {
// Create a notification when the alarm is due
new Notification("Your task " + alarm.data.task + " is now due!");
updateNotified(alarm.data.task);
}
});
alarm + notification
alarm + notification
window.navigator.vibrate(200); // vibrate for 200ms
!
window.navigator.vibrate([100,30,100,30,100,200,200,30,200,30,200,200,10
0,30,100,30,100]); // Vibrate 'SOS' in Morse.
vibration
window.addEventListener('devicelight', function(deviceLightEvent) {
/* Check ambient light status */
if (deviceLightEvent.value > 500) { // snow
_self.setSnow();
}
else if (deviceLightEvent.value > 100) { // morning
_self.setMorning();
}
else if (deviceLightEvent.value > 10) { // evening
_self.setEvening();
}
else { // night
_self.setNight();
}
});
light sensor

Recommended for you

C# J# Java
C# J# JavaC# J# Java
C# J# Java

Este documento compara las similitudes y diferencias entre los lenguajes de programación C#, J# y Java. Algunas semejanzas son que C# e Java tienen una sintaxis similar derivada de C y C++, e incorporan elementos como decimales, booleanos y cadenas. Algunas diferencias son que C# es el lenguaje nativo de .NET y se usa principalmente para plataformas Microsoft, mientras que Java es multiplataforma y más completo que .NET. J# solo soporta un subconjunto de características de .NET.

085277450480 087766274593 082123575794 085360504502 085360908052 ...
085277450480    087766274593     082123575794    085360504502   085360908052 ...085277450480    087766274593     082123575794    085360504502   085360908052 ...
085277450480 087766274593 082123575794 085360504502 085360908052 ...
Belgian mobile app developer profile
Belgian mobile app developer profileBelgian mobile app developer profile
Belgian mobile app developer profile

The document profiles Belgian mobile app developers. It provides statistics showing smartphones overtaking feature phones in sales and market share. It also shares results from surveys of Belgian app developers, including their job roles, revenue models, app categories, and challenges. Pie charts and graphs visualize data on developers' geographical locations, companies they work for, how they make money, and which app platforms and stores they use or intend to use.

light sensor
light sensor
window.addEventListener("deviceorientation", handleOrientation, true);
!
function handleOrientation(event) {
var alpha = event.alpha;
var beta = event.beta;
var gamma = event.gamma;
!
// Do stuff with the new orientation data
}
device orientation
device orientation
alpha
betagamma

Recommended for you

Doing the open source thingy
Doing the open source thingyDoing the open source thingy
Doing the open source thingy

This document discusses open source and provides guidance on how to do open source. It explains what open source is, why developers should consider it, and how to structure an open source project. Key steps include identifying the scope of the project, abstracting the code, choosing an open source license, standardizing build processes, documenting code, ensuring quality through testing and CI/CD, and making the project visible to gain contributors. The overall message is that going open source allows for improved quality and quantity of code through community involvement, but it shouldn't be forced if it isn't a good fit.

githublicenseopen source
Plantilla powerpoint
Plantilla powerpointPlantilla powerpoint
Plantilla powerpoint
Y jmrxzmobile rsearch case study ver.final
Y jmrxzmobile rsearch case study ver.finalY jmrxzmobile rsearch case study ver.final
Y jmrxzmobile rsearch case study ver.final
window.addEventListener('devicemotion', function(event) {
console.log(event.acceleration.x + ' m/s2');
});
device motion
var person = new mozContact();
person.givenName = ["John"];
person.familyName = ["Doe"];
person.nickname = ["No kidding"];
!
var person = new mozContact(contactData); // Firefox OS 1.3 takes a
parameter to initialize the object
if ("init" in person) {
// Firefox OS 1.2 and below uses a "init" method to initialize the
object
person.init(contactData);
}
!
// save the new contact
var saving = navigator.mozContacts.save(person);
!
saving.onsuccess = function() {
console.log('new contact saved');
}; contacts
var message = "Hi!";
var number = "1234"; // There are several ways to retrieve a valid phone
number
!
navigator.mozMobileMessage.send(number, message);
SMS
regular web stuff!
other standards features also work great in this context:
๏ indexeddb/localstorage
๏ web rtc/getusermedia
๏ css animations
๏ SVg

Recommended for you

Business Expansion Planning Srategy
Business Expansion Planning SrategyBusiness Expansion Planning Srategy
Business Expansion Planning Srategy

This presentation includes the topics and its description in brief about planning the business expansion.

marketingplanningstrategy
Tarea bulimia
Tarea bulimiaTarea bulimia
Tarea bulimia

La bulimia es un trastorno alimentario caracterizado por periodos de consumo excesivo de comida seguidos de vómitos o uso de laxantes para eliminar las calorías ingeridas, debido al temor a engordar. La sociedad actual promueve un canon de belleza delgado que ejerce presión sobre quienes no se ajustan a él, lo que puede contribuir al desarrollo de trastornos alimentarios.

developer

experience
developer experience
we want to give the web a first class development experience,
alongside native ecosystems:
๏ documentation
๏ developer tools
๏ frameworks, templates, libraries
documentation
announce new things, provide useful references, give
recommendations
๏ hacks blog
๏ mdn app center
developer tools
developer tools
๏ firefox’s standard toolbox
๏ app manager
๏ remote debugging
๏ you can run gaia inside desktop firefox too

Recommended for you

Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania

The document summarizes key aspects of building Firefox OS to address issues with the mobile web. Firefox OS is Mozilla's attempt to make the web a first-class citizen on phones and tablets by starting with the web stack rather than trying to add the web to an existing OS. It has launched in several countries and aims to be an affordable alternative to feature phones and closed platforms. The architecture is based on Linux, Gecko, and web technologies. It provides predictable HTML5 support and addresses performance, fragmentation, security and hardware access through its design and web APIs.

imworldkeynotefirefoxos
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla

This document summarizes the Firefox OS, an open web platform for building mobile apps and customizing the user interface using HTML5, CSS, and JavaScript. It outlines key web APIs, the process for developing and publishing open web apps, and the different types of apps including regular web apps, installed web apps, and privileged web apps with additional capabilities. Security levels and permissions for APIs are also discussed.

apiweb apiapis
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefox

Firefox OS is an open source operating system built using HTML5 that aims to fulfill the promises made by HTML5 as a platform. It gives developers full access to device hardware through Web APIs while allowing app distribution through the web. The OS is already available on low-cost devices in certain markets. It uses the Gecko rendering engine and a simple architecture based on Linux and Android. This allows it to provide predictable HTML5 support and security for web apps. Developers can build apps using standard web technologies and distribute them via the Firefox OS marketplace or by installing them directly from the web.

frameworks and libraries
ready made code to make development easier
๏ mortar app templates
๏ brick: web components for building up interfaces quickly
๏ libraries to solve real world problems, for example localforage
๏ firefox os boilerplate: great resource for learning about fxos
๏ phonegap now has firefox os as a target platform
performance

enhancers
performance enhancers
because the web can still be a bit slow
๏ web workers
๏ asm.js
๏ emscripten
web workers
web workers
๏ run scripts in a background thread
๏ don’t block the main thread execution
๏ specify a script to run in the background
๏ pass messages between the two

Recommended for you

Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS

This document provides an overview and introduction to the webOS platform. It discusses the webOS architecture including application architecture using stages and scenes. It covers building a basic "Destroy World" app using the command line tools. It also discusses the webOS emulator, advanced APIs like camera, storage and accelerometer access. Finally it discusses submitting apps to the webOS app catalog and a promotion for hot new apps.

palmdevwebosjavascript
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London

Firefox OS allows developers to build apps and customize the user interface using HTML5, CSS, JavaScript, and Web APIs. Apps are developed as regular web apps, with the addition of an app manifest file. Apps can be published to the Firefox Marketplace or installed directly. The Firefox OS platform provides both regular web APIs as well as more privileged APIs that require permissions. Future plans include additional APIs for features like spell checking, peer-to-peer connectivity, and WebRTC. Developers can get help through IRC channels or mailing lists and try things out using emulators, boilerplate apps, and the Firefox OS developer preview.

javascriptmobilefirefox os
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?

My Slides about creating web sites which could also be useable even if you are not online! From Web Storages to Service Workers. Presented at Mobiletech Conference in Munich March 2017

local storageservice workersdevelopment
asm.js
asm.js
๏ just javascript
๏ a very efficient low-level subset
๏ suitable for ahead-of-time optimizing compilation
๏ Unity3d now has asm.js/WebGL support
emscripten
emscripteN
๏ an LLVM to javascript compiler (well, asm.js, specifically)
๏ compile c++ (and others) into JS and run it on the web
๏ = “very fast shit” ™
resources
๏ look up localforage - polyfill for indexeddb/websql/localstorage
๏ simplewebrtc.com - simple webrtc library
๏ animate.css - good library for css animations
๏ raphaeljs.com, d3js.org - svg libraries
๏ emscripten.org - try quakejs.com and unrealengine.com/html5 in
a recent version of firefox, opera or chrome
๏ asmjs.org
๏ MDN app center: developer.mozilla.org/en-US/Apps
๏ hacks blog: hacks.mozilla.org
thanks for

listening!!
slideshare.net/chrisdavidmills cmills@mozilla.com // @chrisdavidmills
The end

Recommended for you

Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps

With the upcoming release of Windows 8, Microsoft decided to bring HTML+Javascript into the world of Windows-platform application development as a first-class citizen. But make no mistake, this isn’t an attempt to somehow subvert Web developers—it’s more about enabling Web developers to leverage those skills in building “native” Windows applications running on the Windows 8 laptops, desktops, and slates. In this presentation, we’ll go over the basics of building a Windows 8 app using HTML and JavaScript, including a brief overview of what’s possible—and what’s not—for the Web developer seeking to “go native” on Windows.

javascriptwindows 8html
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...

The document discusses building apps for Firefox OS using open web technologies like HTML5, CSS, and JavaScript. It explains that apps can be developed like regular web apps and then packaged for installation on Firefox OS devices. Developers can access device APIs for features like contacts, notifications, and sensors. The document outlines the steps to take which include developing the app, creating a manifest file, and publishing/installing the app. It provides details on various web APIs and permissions available to Firefox OS apps.

webapiswebrtcfirefox os
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks

This document provides 14 lessons and hacks for building native and mobile web applications using JavaScript. It discusses issues like architecting for multiple platforms and environments, structuring the codebase, detecting the platform, improving performance of animations through CSS transitions, handling garbage collection of images and HTML, supporting touch events, adding sound, and leveraging tools like PhoneGap Build. The tips aim to help developers apply their web skills to build applications that run on both desktop and mobile devices using a single codebase.

More Related Content

What's hot

High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)
Nicholas Zakas
 
HTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedHTML5 Web Workers-unleashed
HTML5 Web Workers-unleashed
Peter Lubbers
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
Kevin Decker
 
High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)
Nicholas Zakas
 
React & The Art of Managing Complexity
React &  The Art of Managing ComplexityReact &  The Art of Managing Complexity
React & The Art of Managing Complexity
Ryan Anklam
 
Building Cross Platform Apps with Electron
Building Cross Platform Apps with ElectronBuilding Cross Platform Apps with Electron
Building Cross Platform Apps with Electron
Chris Ward
 
Getting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workersGetting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workers
Flumes
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
Ignacio Martín
 
Web workers
Web workersWeb workers
Web workers
Surbhi Mathur
 
Responsive interfaces
Responsive interfacesResponsive interfaces
Responsive interfaces
Nicholas Zakas
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery Plugins
Marc Grabanski
 
JavaScript Web Workers
JavaScript Web WorkersJavaScript Web Workers
JavaScript Web Workers
Tobias Pfeiffer
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
Chris Love
 
PWA 與 Service Worker
PWA 與 Service WorkerPWA 與 Service Worker
PWA 與 Service Worker
Anna Su
 
High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010
Nicholas Zakas
 
Chrome enchanted 2015
Chrome enchanted 2015Chrome enchanted 2015
Chrome enchanted 2015
Chang W. Doh
 
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
David Kaneda
 
Don't Over-React - just use Vue!
Don't Over-React - just use Vue!Don't Over-React - just use Vue!
Don't Over-React - just use Vue!
Raymond Camden
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Ryan Weaver
 

What's hot (19)

High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)
 
HTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedHTML5 Web Workers-unleashed
HTML5 Web Workers-unleashed
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
 
High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)
 
React & The Art of Managing Complexity
React &  The Art of Managing ComplexityReact &  The Art of Managing Complexity
React & The Art of Managing Complexity
 
Building Cross Platform Apps with Electron
Building Cross Platform Apps with ElectronBuilding Cross Platform Apps with Electron
Building Cross Platform Apps with Electron
 
Getting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workersGetting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workers
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
 
Web workers
Web workersWeb workers
Web workers
 
Responsive interfaces
Responsive interfacesResponsive interfaces
Responsive interfaces
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery Plugins
 
JavaScript Web Workers
JavaScript Web WorkersJavaScript Web Workers
JavaScript Web Workers
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
 
PWA 與 Service Worker
PWA 與 Service WorkerPWA 與 Service Worker
PWA 與 Service Worker
 
High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010
 
Chrome enchanted 2015
Chrome enchanted 2015Chrome enchanted 2015
Chrome enchanted 2015
 
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
 
Don't Over-React - just use Vue!
Don't Over-React - just use Vue!Don't Over-React - just use Vue!
Don't Over-React - just use Vue!
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
 

Viewers also liked

GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA
GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELAGOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA
GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA
Maribel Ch
 
"basic of Costing" hearing session
"basic of Costing" hearing session"basic of Costing" hearing session
"basic of Costing" hearing session
koichi ikeda
 
Book Paula S.
Book Paula S.Book Paula S.
Book Paula S.
paulispinel
 
Apresentações: o que os melhores apresentadores sabem, fazem e falam
Apresentações: o que os melhores apresentadores sabem, fazem e falamApresentações: o que os melhores apresentadores sabem, fazem e falam
Apresentações: o que os melhores apresentadores sabem, fazem e falam
www.debatendoadm.blogspot.com
 
Ecuaciones de tercer grado
Ecuaciones de tercer gradoEcuaciones de tercer grado
Ecuaciones de tercer grado
henry escandon
 
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 MinutesVirginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Hadi Aboukhater
 
5 BS Facts About Data Privacy Everyone Thinks Are True
5 BS Facts About Data Privacy Everyone Thinks Are True5 BS Facts About Data Privacy Everyone Thinks Are True
5 BS Facts About Data Privacy Everyone Thinks Are True
Social Media Today
 
Travel pdf
Travel pdfTravel pdf
Travel pdf
billbabeaux
 
Puentes colgantes
Puentes colgantesPuentes colgantes
Puentes colgantes
sayuriEA
 
Open House 2010
Open House 2010Open House 2010
Open House 2010
Anthony Solis
 
Pautas para la gestión de los árbitros 2
Pautas para la gestión de los árbitros 2Pautas para la gestión de los árbitros 2
Pautas para la gestión de los árbitros 2
solofutsal
 
C# J# Java
C# J# JavaC# J# Java
085277450480 087766274593 082123575794 085360504502 085360908052 ...
085277450480    087766274593     082123575794    085360504502   085360908052 ...085277450480    087766274593     082123575794    085360504502   085360908052 ...
085277450480 087766274593 082123575794 085360504502 085360908052 ...
Riky Suhendra ..
 
Belgian mobile app developer profile
Belgian mobile app developer profileBelgian mobile app developer profile
Belgian mobile app developer profile
Mobile Monday Brussels
 
Doing the open source thingy
Doing the open source thingyDoing the open source thingy
Doing the open source thingy
Wiebe Elsinga
 
Y jmrxzmobile rsearch case study ver.final
Y jmrxzmobile rsearch case study ver.finalY jmrxzmobile rsearch case study ver.final
Y jmrxzmobile rsearch case study ver.final
MROC Japan
 
Business Expansion Planning Srategy
Business Expansion Planning SrategyBusiness Expansion Planning Srategy
Business Expansion Planning Srategy
Indore Colour Organics Ltd.
 
Tarea bulimia
Tarea bulimiaTarea bulimia
Tarea bulimia
Emanuel Chin Heredia
 

Viewers also liked (20)

GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA
GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELAGOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA
GOBIERNO ELECTRÓNICO COMO HERRAMIENTA DE GESTIÓN PÚBLICA EN VENEZUELA
 
"basic of Costing" hearing session
"basic of Costing" hearing session"basic of Costing" hearing session
"basic of Costing" hearing session
 
Book Paula S.
Book Paula S.Book Paula S.
Book Paula S.
 
Apresentações: o que os melhores apresentadores sabem, fazem e falam
Apresentações: o que os melhores apresentadores sabem, fazem e falamApresentações: o que os melhores apresentadores sabem, fazem e falam
Apresentações: o que os melhores apresentadores sabem, fazem e falam
 
Ecuaciones de tercer grado
Ecuaciones de tercer gradoEcuaciones de tercer grado
Ecuaciones de tercer grado
 
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 MinutesVirginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
 
5 BS Facts About Data Privacy Everyone Thinks Are True
5 BS Facts About Data Privacy Everyone Thinks Are True5 BS Facts About Data Privacy Everyone Thinks Are True
5 BS Facts About Data Privacy Everyone Thinks Are True
 
Travel pdf
Travel pdfTravel pdf
Travel pdf
 
Puentes colgantes
Puentes colgantesPuentes colgantes
Puentes colgantes
 
Open House 2010
Open House 2010Open House 2010
Open House 2010
 
Pautas para la gestión de los árbitros 2
Pautas para la gestión de los árbitros 2Pautas para la gestión de los árbitros 2
Pautas para la gestión de los árbitros 2
 
C# J# Java
C# J# JavaC# J# Java
C# J# Java
 
085277450480 087766274593 082123575794 085360504502 085360908052 ...
085277450480    087766274593     082123575794    085360504502   085360908052 ...085277450480    087766274593     082123575794    085360504502   085360908052 ...
085277450480 087766274593 082123575794 085360504502 085360908052 ...
 
Belgian mobile app developer profile
Belgian mobile app developer profileBelgian mobile app developer profile
Belgian mobile app developer profile
 
Doing the open source thingy
Doing the open source thingyDoing the open source thingy
Doing the open source thingy
 
Plantilla powerpoint
Plantilla powerpointPlantilla powerpoint
Plantilla powerpoint
 
Y jmrxzmobile rsearch case study ver.final
Y jmrxzmobile rsearch case study ver.finalY jmrxzmobile rsearch case study ver.final
Y jmrxzmobile rsearch case study ver.final
 
Lj
LjLj
Lj
 
Business Expansion Planning Srategy
Business Expansion Planning SrategyBusiness Expansion Planning Srategy
Business Expansion Planning Srategy
 
Tarea bulimia
Tarea bulimiaTarea bulimia
Tarea bulimia
 

Similar to Empowering the "mobile web"

Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
Christian Heilmann
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
Robert Nyman
 
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefox
NAVER D2
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
fpatton
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
Robert Nyman
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
Carsten Sandtner
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
JAX London
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Robert Nyman
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
DevelopmentArc LLC
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
Rakesh Jha
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
Rakesh Jha
 
Mozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJS
Robert Nyman
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
Adam Lu
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
Ulrich Krause
 
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Frédéric Harper
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
Mohab El-Shishtawy
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
Stfalcon Meetups
 
Frontend. Global domination.
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.
Андрей Вандакуров
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
Engin Hatay
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
Hazem Saleh
 

Similar to Empowering the "mobile web" (20)

Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefox
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 
Mozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJS
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
 
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
 
Frontend. Global domination.
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
 

More from Chris Mills

More efficient, usable web
More efficient, usable webMore efficient, usable web
More efficient, usable web
Chris Mills
 
Feedback handling, community wrangling, panhandlin’
Feedback handling, community wrangling, panhandlin’Feedback handling, community wrangling, panhandlin’
Feedback handling, community wrangling, panhandlin’
Chris Mills
 
Guerrilla education
Guerrilla educationGuerrilla education
Guerrilla education
Chris Mills
 
BrazilJS MDN
BrazilJS MDNBrazilJS MDN
BrazilJS MDN
Chris Mills
 
Documentation and publishing
Documentation and publishingDocumentation and publishing
Documentation and publishing
Chris Mills
 
MDN is easy!
MDN is easy!MDN is easy!
MDN is easy!
Chris Mills
 
Getting rid of images with CSS
Getting rid of images with CSSGetting rid of images with CSS
Getting rid of images with CSS
Chris Mills
 
Future layouts
Future layoutsFuture layouts
Future layouts
Chris Mills
 
Laying out the future
Laying out the futureLaying out the future
Laying out the future
Chris Mills
 
Accessibility doesn't exist
Accessibility doesn't existAccessibility doesn't exist
Accessibility doesn't exist
Chris Mills
 
Responsive web design standards?
Responsive web design standards?Responsive web design standards?
Responsive web design standards?
Chris Mills
 
Adapt! Media queries and viewport
Adapt! Media queries and viewportAdapt! Media queries and viewport
Adapt! Media queries and viewport
Chris Mills
 
Adapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the futureAdapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the future
Chris Mills
 
Angels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusiveAngels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusive
Chris Mills
 
HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?
Chris Mills
 
The W3C and the web design ecosystem
The W3C and the web design ecosystemThe W3C and the web design ecosystem
The W3C and the web design ecosystem
Chris Mills
 
HTML5 Pearson preso
HTML5 Pearson presoHTML5 Pearson preso
HTML5 Pearson preso
Chris Mills
 
Brave new world of HTML5
Brave new world of HTML5Brave new world of HTML5
Brave new world of HTML5
Chris Mills
 
Inclusive design: real accessibility for everyone
Inclusive design: real accessibility for everyoneInclusive design: real accessibility for everyone
Inclusive design: real accessibility for everyone
Chris Mills
 
The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)
Chris Mills
 

More from Chris Mills (20)

More efficient, usable web
More efficient, usable webMore efficient, usable web
More efficient, usable web
 
Feedback handling, community wrangling, panhandlin’
Feedback handling, community wrangling, panhandlin’Feedback handling, community wrangling, panhandlin’
Feedback handling, community wrangling, panhandlin’
 
Guerrilla education
Guerrilla educationGuerrilla education
Guerrilla education
 
BrazilJS MDN
BrazilJS MDNBrazilJS MDN
BrazilJS MDN
 
Documentation and publishing
Documentation and publishingDocumentation and publishing
Documentation and publishing
 
MDN is easy!
MDN is easy!MDN is easy!
MDN is easy!
 
Getting rid of images with CSS
Getting rid of images with CSSGetting rid of images with CSS
Getting rid of images with CSS
 
Future layouts
Future layoutsFuture layouts
Future layouts
 
Laying out the future
Laying out the futureLaying out the future
Laying out the future
 
Accessibility doesn't exist
Accessibility doesn't existAccessibility doesn't exist
Accessibility doesn't exist
 
Responsive web design standards?
Responsive web design standards?Responsive web design standards?
Responsive web design standards?
 
Adapt! Media queries and viewport
Adapt! Media queries and viewportAdapt! Media queries and viewport
Adapt! Media queries and viewport
 
Adapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the futureAdapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the future
 
Angels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusiveAngels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusive
 
HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?
 
The W3C and the web design ecosystem
The W3C and the web design ecosystemThe W3C and the web design ecosystem
The W3C and the web design ecosystem
 
HTML5 Pearson preso
HTML5 Pearson presoHTML5 Pearson preso
HTML5 Pearson preso
 
Brave new world of HTML5
Brave new world of HTML5Brave new world of HTML5
Brave new world of HTML5
 
Inclusive design: real accessibility for everyone
Inclusive design: real accessibility for everyoneInclusive design: real accessibility for everyone
Inclusive design: real accessibility for everyone
 
The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)
 

Recently uploaded

UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 

Recently uploaded (20)

UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 

Empowering the "mobile web"

  • 1. EMPOWERING THE
 MOBILE WEB Chris Mills // Mozilla cmills@mozilla.com // @chrisdavidmills
  • 2. don’t stress about taking notes: ๏ These slides are all at slideshare.net/chrisdavidmills ๏ developer.mozilla.org ๏ @chrisdavidmills ๏ cmills@mozilla.com ๏ #mdn irc channel on mozilla irc ๏ dev-mdc@lists.mozilla.org mailing list
  • 3. ๏ heavy metal drummer turned web nerd ๏ tech writer @ mozilla ๏ web tinkerer (HTML, CSS, JS) ๏ accessibility whiner ๏ educator who am i? mdn!!
  • 5. what is the mobile web? wap ๏ (blarrrgh, awful...)
  • 6. what is the mobile web? the web for mobile phones ๏ real mobile browsers ๏ separate web sites for mobiles ๏ lots of ua sniffing crimes
  • 7. what is the mobile web? the web as it is experienced on mobiles/tablets/etc. ๏ more thought given to ux; to context ๏ progressive enhancement ๏ feature detection ๏ responsive
  • 8. what is the mobile web? the web while you’re on the move ๏ geolocation ๏ offline data storage
  • 9. what is the mobile web? web technologies providing “native” capabilities ๏ installable apps ๏ control over device hardware and key services ๏ app ecosystem/marketplace ๏ fully functional offline apps ๏ high fps performance
  • 11. web versus native, the age-old struggle
  • 12. the usual arguments native is better? ๏ faster? ๏ more integrated, consistent experience? ๏ better developer ecosystem? ๏ more secure?
  • 13. the usual arguments ๏ web sites accessing other tabs or apps? ๏ web sites accessing
 camera
 contacts
 e-mail?
  • 15. solutions we’ve been working hard on this at mozilla ๏ app ecosystem ๏ firefox os ๏ apis ๏ developer experience and tools ๏ performance
  • 17. installable apps not a new phenomenon, but... ๏ pretty recent concept for the web ๏ manifest file defines app (manifest.webapp) ๏ installation controlled by app installation and management apis
  • 18. { "version": "0.1", "name": "To-do alarms", "description": "My awesome open web app", "launch_path": "/index.html", "icons": { "128": "/img/icon-128.png" }, "developer": { "name": "Chris Mills", "url": "http://yourawesomeapp.com" }, "locales": { "es": { "description": "Su nueva aplicación impresionante Open Web", "developer": { "url": "http://yourawesomeapp.com" } }, manifest example
  • 19. var manifest_url = location.href.substring(0, location.href.lastIndexOf("/")) + "/manifest.webapp"; function install() { // install the app var install = navigator.mozApps.install(manifest_url); install.onsuccess = function(data) { // App is installed, do something if you like }; install.onerror = function() { // App wasn't installed, info is in // install.error.name alert(install.error.name); }; }; installation example
  • 20. app types Apps can be: ๏ hosted: just like a normal web site, but with a manifest and install functionality ๏ packaged: zipped up, hosted somewhere (like the firefox marketplace)
  • 21. app stores you are free to distribute your apps how you like ๏ marketplace.firefox.com ๏ team of reviewers verify apps before they are accepted ๏ you can also host your own apps ๏ or set up your own marketplace
  • 22. app payments now you can charge money for web apps ๏ payments api (mozpay) that uses the bango payments provider ๏ receipt verification to make sure payments are completed ๏ in-app payments also available
  • 23. web runtime web rt allows installable apps to work on other platforms ๏ apk wrapper for android apps, which includes native equivalents where possible ๏ similar native wrappers for desktop platforms coming up ๏ firefox marketplace/Firefox will generate these
  • 25. firefox os! our mobile platform ๏ totally built on open web technologies ๏ mostly standards ๏ some are new inventions, with standardization being worked on ๏ designed for low power devices
  • 26. successes so far lots of success so far: ๏ 4 hardware partners ๏ 16 launches in 15 countries ๏ 30% market share with TEF in Uruguay; 12% market share with TEF in Colombia ๏ vibrant developer community ๏ developer preview devices available
  • 27. architecture three main layers ๏ gonk: linux kernel plus hardware abstraction layer ๏ gecko: entire system runs on our rendering engine ๏ gaia: ui plus default system apps
  • 28. architecture everything runs in gecko ๏ each app runs in an iframe, hanging off main process ๏ this enforces cross app security (sandbox) ๏ as does api permissions system (see later) ๏ oom errors handled via a priority system
  • 29. apis
  • 30. apis!!! we want to control everything from the web ๏ so we’re creating apis to handle access to device hardware, system functions, etc. ๏ security handled by permissions, in the manifest
  • 31. api permissions different apis have different permission levels: ๏ standard apis can be accessed by any app ๏ privileged apis can only be used in a packaged, verified apps (e.g. contacts, device storage, keyboard) ๏ certified apis can only be used by vendor-installed apps (e.g. camera, sms, dialer, bluetooth)
  • 32. var pick = new MozActivity({ name: "pick", data: { type: ["image/png", "image/jpg", "image/jpeg"] 
 } }); web activities (intents)
  • 34. pick.onsuccess = function () { // Create image and set the returned blob as the src var img = document.createElement("img"); img.src = window.URL.createObjectURL(this.result.blob); // Present that image in your app var imagePresenter = document.querySelector("#image-presenter"); imagePresenter.appendChild(img); }; pick.onerror = function () { // If an error occurred or the user canceled the activity alert("Can't view the image!"); }; web activities
  • 35. var img = '/to-do-notifications/img/icon-128.png'; var text = 'HEY! Your task "' + title + '" is now overdue.'; var notification = new Notification('To do list', { body: text, icon: img }); notification
  • 36. ! var myAlarmDate = new Date(month.value + " " + day.value + ", " + year.value + " " + hours.value + ":" + minutes.value + ":00"); ! var data = { task: title.value } ! var request = navigator.mozAlarms.add(myAlarmDate, "ignoreTimezone", data); ! request.onsuccess = function () { console.log("Alarm successfully scheduled"); var alarmRequest = navigator.mozAlarms.getAll(); alarmRequest.onsuccess = function() { newAlarmId = this.result[(this.result.length)-1].id; } }; alarm
  • 37. navigator.mozSetMessageHandler("alarm", function (alarm) { // only launch a notification if the Alarm is of the right type for this app if(alarm.data.task) { // Create a notification when the alarm is due new Notification("Your task " + alarm.data.task + " is now due!"); updateNotified(alarm.data.task); } }); alarm + notification
  • 39. window.navigator.vibrate(200); // vibrate for 200ms ! window.navigator.vibrate([100,30,100,30,100,200,200,30,200,30,200,200,10 0,30,100,30,100]); // Vibrate 'SOS' in Morse. vibration
  • 40. window.addEventListener('devicelight', function(deviceLightEvent) { /* Check ambient light status */ if (deviceLightEvent.value > 500) { // snow _self.setSnow(); } else if (deviceLightEvent.value > 100) { // morning _self.setMorning(); } else if (deviceLightEvent.value > 10) { // evening _self.setEvening(); } else { // night _self.setNight(); } }); light sensor
  • 43. window.addEventListener("deviceorientation", handleOrientation, true); ! function handleOrientation(event) { var alpha = event.alpha; var beta = event.beta; var gamma = event.gamma; ! // Do stuff with the new orientation data } device orientation
  • 46. var person = new mozContact(); person.givenName = ["John"]; person.familyName = ["Doe"]; person.nickname = ["No kidding"]; ! var person = new mozContact(contactData); // Firefox OS 1.3 takes a parameter to initialize the object if ("init" in person) { // Firefox OS 1.2 and below uses a "init" method to initialize the object person.init(contactData); } ! // save the new contact var saving = navigator.mozContacts.save(person); ! saving.onsuccess = function() { console.log('new contact saved'); }; contacts
  • 47. var message = "Hi!"; var number = "1234"; // There are several ways to retrieve a valid phone number ! navigator.mozMobileMessage.send(number, message); SMS
  • 48. regular web stuff! other standards features also work great in this context: ๏ indexeddb/localstorage ๏ web rtc/getusermedia ๏ css animations ๏ SVg
  • 50. developer experience we want to give the web a first class development experience, alongside native ecosystems: ๏ documentation ๏ developer tools ๏ frameworks, templates, libraries
  • 51. documentation announce new things, provide useful references, give recommendations ๏ hacks blog ๏ mdn app center
  • 52. developer tools developer tools ๏ firefox’s standard toolbox ๏ app manager ๏ remote debugging ๏ you can run gaia inside desktop firefox too
  • 53. frameworks and libraries ready made code to make development easier ๏ mortar app templates ๏ brick: web components for building up interfaces quickly ๏ libraries to solve real world problems, for example localforage ๏ firefox os boilerplate: great resource for learning about fxos ๏ phonegap now has firefox os as a target platform
  • 55. performance enhancers because the web can still be a bit slow ๏ web workers ๏ asm.js ๏ emscripten
  • 56. web workers web workers ๏ run scripts in a background thread ๏ don’t block the main thread execution ๏ specify a script to run in the background ๏ pass messages between the two
  • 57. asm.js asm.js ๏ just javascript ๏ a very efficient low-level subset ๏ suitable for ahead-of-time optimizing compilation ๏ Unity3d now has asm.js/WebGL support
  • 58. emscripten emscripteN ๏ an LLVM to javascript compiler (well, asm.js, specifically) ๏ compile c++ (and others) into JS and run it on the web ๏ = “very fast shit” ™
  • 59. resources ๏ look up localforage - polyfill for indexeddb/websql/localstorage ๏ simplewebrtc.com - simple webrtc library ๏ animate.css - good library for css animations ๏ raphaeljs.com, d3js.org - svg libraries ๏ emscripten.org - try quakejs.com and unrealengine.com/html5 in a recent version of firefox, opera or chrome ๏ asmjs.org ๏ MDN app center: developer.mozilla.org/en-US/Apps ๏ hacks blog: hacks.mozilla.org