Daniele Scasciafratte

##Firefox OS development for newbie

Develop an app has never been easier

HTML5 Codeshow Roma - Mozilla Codeshow
Speaker: Daniele “Mte90” Scasciafratte (@Mte90Net)

##It’s Me Mario Ehm Daniele

Daniele Scasciafratte aka Mte90

##Firefox OS

Firefox OS is a mobile operative system based on Linux and Android, divided in three layers:
Gonk (the kernel), Gecko (browser engine) and Gaia (HTML5 UI)

##You like to win easily, don’t you?
Firefox OS is very simple for a HTML5 Developer, Web Developer, Lazy Developer, Javascript Developer, Apps Developer, Bored Developer etc.

##Standard W3C APIs
Firefox OS use Gecko, that follows the W3C guidelines for the APIs
Furthermore many of these API was born on Firefox OS like Vibration API or Battery API

##Vendor APIs
Firefox OS have vendor APIs (often they’re privileged) for access to SO features like the Alarm

##WebActivity APIs
WebActivity is the solution for exchange data/communicate/launch other app/etc between an app and the other one

##I choose you

WebTelephony, Vibration API, WebSMS, Idle API, Screen Orientation, Settings API, Power manager API, Mobile Connection API, TCP Socket API, Geolocation API, WiFi Information API, Device Storage API, Contacts API, Mouse Lock API, Open WebApps, WebBluetooth, Network Information API, Battery Status API, Alarm API, Browser API, Time/Clock API, Web Activities, Push Notification API, Permission API, WebFM API, FileHandle API, Network Stats API, WebPayment, IndexedDB, Archive API, Ambient Light Sensor API, Proximity Sensor, SystemXHR, WebNFC etc…

Source: https://wiki.mozilla.org/WebAPI

##Make money!
Mozilla has created an API for Web Payment
Source: https://developer.mozilla.org/en-US/docs/Web/Apps/Publishing/In-app_payments
Library: https://hacks.mozilla.org/2014/09/introducing-fxpay-for-in-app-payments/
Working with receipts for paid apps

##We want the code!
Let’s talk about some useful resources for the newbie developer and the Firefox OS Developer

##Open Web Apps

##Firefox OS Boilerplate App Let’s start with an interactive example!


http://robnyman.github.io/Firefox-OS-Boilerplate-App/

##Gaia Components JavaScript framework of Gaia with documentation


Demos: http://wilsonpage.github.io/presentations/web-components-in-production , http://github.com/gaia-components

##l10n.js

##mozPolyfill.js
Simple way for adding the missing APIs in the other browsers

http://mte90.github.io/moz-polyfills/

##Official support

##Framework with Firefox OS support

Dart Firefox OS Boilerplate App

##Testing

##Cross Origin Request
The principal debug problem in the Open Web Apps is the CORS
The flag mozSystem: true in the AJAX request disable the block of the browser

##CLI

##Node-fxos/Node-firefox
Node tools for Firefox OS (gulp and grunt support)
Ex: fxos-deploy, fxos-start, x-ports, fxos-reloadcss
http://nicola.github.io/node-fxos/
https://github.com/mozilla/node-firefox, Introducing node-firefox

##Documentation

##MDN


https://developer.mozilla.org/

##Developing for Firefox OS


https://leanpub.com/quickguidefirefoxosdevelopment
https://leanpub.com/guidavelocesviluppofirefoxos

##Workflow

##Development Workflow

##Manifest validator

Simple validator that check your manifest and other little things

https://marketplace.firefox.com/developers/validator

##Marketplace

##Web Site Reference

##

Link talk: http://goo.gl/B79Efy
Talk by:
Daniele Scasciafratte - @Mte90Net - Mte90.net