Top Banner
Develop FirefoxOS [email protected] v1.2
82

Developing FirefoxOS

Jan 28, 2015

Download

Technology

Fred Lin

Share with college students about how FirefoxOS development works and the procedure and resource to contribute to FirefoxOS
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Developing FirefoxOS

Develop [email protected]

v1.2

Page 2: Developing FirefoxOS

Why I’m here?

Page 3: Developing FirefoxOS

About Me:

• Mozilla Firefox OS front-end developer• GTUG Taipei Organizer (Open)• Android developer and book author (Mobile)• Python Web developer (Web)

http://www.gasolin.idv.tw

Page 4: Developing FirefoxOS

Mozilla can help YOU

and YOU can help us, too

Page 5: Developing FirefoxOS

Mozilla, Firefox & Firefox OS

Page 6: Developing FirefoxOS

Gecko

Core Browser Engine

Page 7: Developing FirefoxOS

GeckoNetscape90’ Browser

Page 8: Developing FirefoxOS

GeckoNetscape

Firefox (windows)

Firefox (mac)

Firefox (linux)

Desktop Firefox

Page 9: Developing FirefoxOS

GeckoNetscape

Firefox (windows)

Firefox (mac)

Firefox (linux)

Firefox (android)

Firefox for Mobile

Page 10: Developing FirefoxOS

GeckoNetscape

Firefox (windows)

Firefox (mac)

Firefox (linux)

Firefox (android)

Firefox OS

Page 11: Developing FirefoxOS

Firefox OS Architecture

Device

Kernel

APIs

Native API-based UX

Web Browser/ Platform

Device

Kernel

Web Engine / Standard Device APIs

Web-based User Experience/Web Content•

•@

Firefox OS

Existing Platforms

HW and kernel/drivers from

Android or other embedded stacks

Architecture differs from others:

• Scales from feature phones to high-end smartphones • Enables Lower RAM footprint distributions

Significantly small stack

Page 12: Developing FirefoxOS

WHAT IS Firefox OS?B2G = GAIA + GECKO + GONK

Page 13: Developing FirefoxOS

WHAT IS Firefox OS?B2G = GAIA + GECKO + GONK

Web Application

Browser Engine

Linux/HAL/RIL

Page 14: Developing FirefoxOS

WHAT IS Firefox OS?B2G = GAIA + GECKO + GONK

Web Application

Browser Engine

Linux/HAL/RIL

Gaia

Gecko

Gonk

Page 15: Developing FirefoxOS

Firefox OS plans to define & standardize (W3C) all Web APIs required for advanced functionalities in Mobile devices

Unleash Web APIs for Mobile devices

Multitouch

NFC

Bluetooth

Accelerometer

Cameras

Hardware Keys

USB Access

Vibration

Speaker

Microphone

Light Proximity

Sensor

Gyro

SMS

Telephony

http://arewemobileyet.com

Page 16: Developing FirefoxOS

Think about the web

Page 17: Developing FirefoxOS

Facebook

Page 18: Developing FirefoxOS

Twitter

Page 19: Developing FirefoxOS

Web sites are capableAnd can act as Mobile App

Prove of Concept

Page 20: Developing FirefoxOS

FirefoxOS Screenshots: Homescreen

Page 21: Developing FirefoxOS

Calendar

Page 22: Developing FirefoxOS

Contact

Page 23: Developing FirefoxOS

Clock

Page 24: Developing FirefoxOS

MarketPlace https://marketplace.firefox.com/

Page 25: Developing FirefoxOS

WebApp is useful, but can I ...• Write Native/Performance ?• Gaming ?• Video/Auido conferencing ?• Flash ?• Develop Tools?

Page 26: Developing FirefoxOS

Re-Think about the webWhat happens In 2 years

Page 27: Developing FirefoxOS

Gaming without plugin (ASM.js)

http://bit.ly/YfF6gz

Reference

Page 28: Developing FirefoxOS

VideoChat without plugin (webRTC)

http://bit.ly/12f7MY2

Reference

Page 29: Developing FirefoxOS

Flash without plugin (Shumway)

http://mozilla.github.io/shumway/

Reference

Page 30: Developing FirefoxOS

Prototyping App on website (jsFiddle)add /fxos.html to have webapp install page

Page 31: Developing FirefoxOS

Develop just on the web

https://appmaker.mozillalabs.com/

Page 32: Developing FirefoxOS

Develop in the Browser• Firefox addon to simulate and debug web apps

http://mzl.la/1auuWOi

Page 33: Developing FirefoxOS

Web Runtime

WebApp acts as native Apps(Web Runtime)

http://mzl.la/1aDz1Ma

Page 34: Developing FirefoxOS

Web Runtime

Firefox (windows)

Firefox (mac)

Firefox (linux)

WebApp acts as native Apps(Web Runtime)

http://mzl.la/1aDz1Ma

Page 35: Developing FirefoxOS

Web Runtime

Firefox (windows)

Firefox (mac)

Firefox (linux)

Firefox (android)

WebApp acts as native Apps(Web Runtime)

http://mzl.la/1aDz1Ma

Page 36: Developing FirefoxOS

Web Runtime

Firefox (windows)

Firefox (mac)

Firefox (linux)

Firefox (android)

Firefox OS

WebApp acts as native Apps(Web Runtime)

http://mzl.la/1aDz1Ma

Page 37: Developing FirefoxOS

Web App Developer Hubhttps://marketplace.firefox.com/developers/

Reference

Page 38: Developing FirefoxOS

HTML5 Support APIshttps://developer.mozilla.org/docs/HTML/HTML5

Reference

Page 39: Developing FirefoxOS

Web Runtime APIhttps://developer.mozilla.org/en-US/docs/WebAPI

Reference

Page 40: Developing FirefoxOS

FirefoxOS Development Process

Page 41: Developing FirefoxOS

Train Model

http://bit.ly/1caPWsG

Page 42: Developing FirefoxOS

Train Model: Release every 3 month• Time bound: Development + Release• Agile for change• Plan -> Feature complete -> Bug Fixing -> Release Engineering

1.2 Plan

1.2 Dev

1.2 Fix

1.2 Release

PM/ePM/eM ePM/eM/

Engineer QA/Engineer

QA/L10n/Cariier Test

http://mozilla.github.io/process-releases/draft/development_specifics/

Page 43: Developing FirefoxOS

Train Model: Release every 3 month• Time bound: Development + Release• Agile for change• Plan -> Feature complete -> Bug Fixing -> Release Engineering

1.2 Plan

1.2 Dev

1.2 Fix

1.2 Release

PM/ePM/eM ePM/eM/

Engineer QA/Engineer

QA/L10n/Cariier Test

1.3 Plan

1.3 Dev

1.3 Fix

1.3 Release

http://mozilla.github.io/process-releases/draft/development_specifics/

Page 44: Developing FirefoxOS

Train Model: Release every 3 month• Time bound: Development + Release• Agile for change• Plan -> Feature complete -> Bug Fixing -> Release Engineering

1.2 Plan

1.2 Dev

1.2 Fix

1.2 Release

PM/ePM/eM ePM/eM/

Engineer QA/Engineer

QA/L10n/Cariier Test

1.3 Plan

1.3 Dev

1.3 Fix

1.3 Release

1.1 Release

http://mozilla.github.io/process-releases/draft/development_specifics/

Page 45: Developing FirefoxOS

Fundamentals to make it happen...• Issue Tracking

o Bugzillao Code Review per commit

• Version Controlo Mercurialo Git - github

• Continue Integrationo Per commit test - Travis

lint, unittest, integration testo Daily Build - TPBL, Jenkins

Reference

Page 46: Developing FirefoxOS

Let’s play with Gaia• Up-and-running• Discover• My first patch

credit by http://bit.ly/1cnczgr

Page 47: Developing FirefoxOS

Dev-process:Setup and runing

Page 48: Developing FirefoxOS

Get gaia https://github.com/mozilla-b2g/gaia

Page 49: Developing FirefoxOS

Get Aurora or NightlyGet Firefox Alpha version to emulate gaia in browserhttp://aurora.mozilla.org/ or http://nightly.mozilla.org/

Page 50: Developing FirefoxOS

Build Gaia# make steps$ DEBUG=1 make

more options and detail

• Make Options https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Hacking#Make_options

• Hacking Gaia https://hacks.mozilla.org/2013/01/hacking-gaia-for-firefox-os-part-1/

Page 51: Developing FirefoxOS

Run gaia

# open browser$ /[AppPath]/firefox -profile /User/me/gaia/profile-debug

Page 52: Developing FirefoxOS

Dev-process: Discover

Page 53: Developing FirefoxOS

Bugzilla http://bit.ly/YwASU7Find Issues

Page 54: Developing FirefoxOS

Bugzilla http://bit.ly/YwASU7Fire a bug

Page 55: Developing FirefoxOS

good first bughttp://mzl.la/14IUpTh

photo credit by http://www.wallpaperdev.com/wallpaper/2560x1600/cute-baby-printable-version-65303.html

Reference

Page 56: Developing FirefoxOS

Take bug

Page 57: Developing FirefoxOS

Follow bugReference

Page 58: Developing FirefoxOS

DiscussionIRC: #b2g, #gaia (english)#mozilla-taiwan (chinese)

Maillist: https://lists.mozilla.org/listinfo/dev-gaia

Reference

Page 59: Developing FirefoxOS

Dev-process: My First Patch

Another reference: http://mzl.la/15EJpS9

Page 60: Developing FirefoxOS

I have an idea...

[feature] Talking Dialer: play voice with Dialing

(for demo purpose)

Page 61: Developing FirefoxOS

Fire a bugBug 877972 - able to play a short sound clip when keypad is pressed

Page 62: Developing FirefoxOS

Need information or helpUse ‘Need more information from’ field

Page 63: Developing FirefoxOS

CodingCount Number voice clip found...

Page 64: Developing FirefoxOS

CodingCount Number voice clip found...

credit by Bumbler to Speech http://zhusee2.github.io/bumbler-to-speech/

Page 66: Developing FirefoxOS

Pull Request (submit patch)

http://bugzil.la/877972

Page 67: Developing FirefoxOS

Automatic Coding Style (lint) check

rely on lint tools, not humansforced code style check before each commit

credit gjslint https://developers.google.com/closure/utilities/docs/linter_howto

Reference

Page 68: Developing FirefoxOS

Ask Reviewattach github url to bugzilla

photo credit by http://weheartit.com/entry/9380358/via/abz

Page 69: Developing FirefoxOS

send PR for reviewAssign proper reviewer from Module owner list

https://wiki.mozilla.org/Modules/FirefoxOS

Page 70: Developing FirefoxOS

Wait for review

Page 71: Developing FirefoxOS

Wait for review

got ‘review granted’ (r+), or not (r-)

Page 72: Developing FirefoxOS

get feedbackWarning

Page 73: Developing FirefoxOS

get feedbackWarning

Page 74: Developing FirefoxOS

or get granted with criteria

fix it, then...

Warning

Page 75: Developing FirefoxOS

So WHY contribute OSS?you know you can coding, but...

Page 76: Developing FirefoxOS

(It’s all about how good you want to be)

How good are you?

…...

Page 77: Developing FirefoxOS

Make you a better programmer

practice, cowork, feedback

Page 78: Developing FirefoxOS

heal the world?Can you use your code to

photo credit by http://www.flickr.com/photos/noelzialee/267129769/sizes/l/

(make it a better place)

Page 79: Developing FirefoxOS

Make the world a better place

webwide

https://github.com/mozilla-b2g/gaiahttps://github.com/mozilla-b2g/B2G

Page 80: Developing FirefoxOS

去做⼀一些你還沒準備好能做的事那是讓⼈人成⻑⾧長的⽅方式

-- Marissa Mayer

I always did something I was a little not ready to do. I think that’s how you grow.

Page 81: Developing FirefoxOS

Earn your first commithttp://codefirefox.com/videos

Action

Page 82: Developing FirefoxOS

Thanks