SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
How to start
developing apps for
    Firefox OS
    Belén Albeza @ladybenko
Firefox OS?


• It’s a OS for mobile devices
Firefox OS components

  Gonk    Kernel + HW abstraction layer


  Gecko   “Browser” engine (backend)


  Gaia    UI System apps (frontend)
App dev technologies

• Native apps for Firefox OS are web apps
 • HTML5
 • CSS3
 • JavaScript
What? No SDK?
• There are Firefox Web APIs (https://
  wiki.mozilla.org/WebAPI)
  • Phone calls, SMS’s, Bluetooth, camera,
    location, vibration, contacts, etc.
  • But they are JavaScript APIs :)
• Gaia Building Blocks + JS (https://
  github.com/mozilla-b2g/Gaia-UI-Building-
  Blocks)
Gaia Building Blocks

• Pre-made UI components, with HTML +
  CSS ready to copy & paste!
• JS libraries to detect gestures, access to
  local storage, etc.
What do we need to
       start?

• Firefox Nightly (http://nightly.mozilla.org/)
• B2G Simulator (https://addons.mozilla.org/
  en-us/firefox/addon/firefox-os-simulator/)
• Your favourite text editor
Hello World app
File structure

-   hello/
    -   index.html
    -   manifest.app
    -   images/
        -   icon.png
index.html
<!DOCTYPE html>
<html>
<head>
 <title>Hello world!</title>
</head>
<body>
 <h1>Hello World</h1>
</body>
</html>
manifest.app
{
    "name": "Hello World",
    "description": "Lorem ipsum blah blah blah",
    "launch_path": "/index.html",
    "icons": {
      "128": "/images/icon.png"
    }
}
icon.png
Let’s try it!
Tools / Web Developer / Firefox OS
            Simulator
Select the manifest
Distribute your apps on
        the web
You don’t need to be in
    a marketplace

window.navigator.mozApps.install(url);


https://developer.mozilla.org/en-US/docs/Apps/
      Getting_Started#Installing_the_app
Stuff to be aware of...
• Don’t use eval (that rules out a lot of
  libraries)!
• Performance
 • Don’t use template libraries (like
    mustache.js)
  • Do you really need jQuery / mootools?
  • Take a look at the memory
An e-Reader app
Features

• Import ePub books from the SD Card
• Sort books by author/title/last access
• Table of contents
• Remeber last page read
Import ePubs (I)

• Ask for permission to read the SD Card +
  local storage
manifest.webapp
"device-storage:sdcard":{
   "description": "Required to import books
                   from the SD card",
   "access": "readonly"
},
"storage": {
   "description": "Required to store imported
                   books"
}
Import ePubs (II)

• An ePub is just a zip containing HTML +
  metadata
• Use js-inflate + js-unzip to read this zip file
• Use an extended version of js-epub to
  parse the contents
Display eBooks
• Code inspired by Monocle
• Books are rendered using CSS3’s columns
  rules to create the “pages” (so content is a
  veeery long horizontal stripe)
• To improve performance, books are divided
  into “chunks”, based on the table of
  contents
Gaia’s BB + libs
• Use of Gaia’s Building Blocks to have
  something pretty :)
• Libs
 • mediadb.js (access to SD card)
 • async_storage.js (indexDB local storage)
 • gesture_detector.js (gestures)
Thanks!
Questions?
Resources
•   Wiki https://developer.mozilla.org/en/docs/Mozilla/
    Firefox_OS

•   Sample app http://robnyman.github.com/Firefox-
    OS-Boilerplate-App/

•   Firefox OS simulator https://addons.mozilla.org/en-
    US/firefox/addon/firefox-os-simulator/

•   Compile B2G and Gaia https://
    developer.mozilla.org/en-US/docs/Mozilla/
    Firefox_OS/Building_and_installing_Firefox_OS

Contenu connexe

Tendances

The Transparent Web: Bridging the Chasm in Web Development
The Transparent Web: Bridging the Chasm in Web DevelopmentThe Transparent Web: Bridging the Chasm in Web Development
The Transparent Web: Bridging the Chasm in Web Developmenttwopoint718
 
The things we found in your website
The things we found in your websiteThe things we found in your website
The things we found in your websitehernanibf
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHPSteve Fort
 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5Dylan Jay
 
Front End Web Development Basics
Front End Web Development BasicsFront End Web Development Basics
Front End Web Development BasicsTahir Shahzad
 
Website Review with Screen Reader vs. SiteImprove
Website Review with Screen Reader vs. SiteImproveWebsite Review with Screen Reader vs. SiteImprove
Website Review with Screen Reader vs. SiteImproveTroyDeRego
 
DITA, HTML5, and EPUB3 (Content Agility, June 2013)
DITA, HTML5, and EPUB3 (Content Agility, June 2013)DITA, HTML5, and EPUB3 (Content Agility, June 2013)
DITA, HTML5, and EPUB3 (Content Agility, June 2013)Contrext Solutions
 
5 reasons to program javascript
5 reasons to program javascript5 reasons to program javascript
5 reasons to program javascriptMichael Banzon
 
My site is slow
My site is slowMy site is slow
My site is slowhernanibf
 
No folders: A workspace that organizes for you
No folders: A workspace that organizes for youNo folders: A workspace that organizes for you
No folders: A workspace that organizes for youBen Foden
 
BDD in Drupal 8 Using Behat, mink and Selenium
BDD in Drupal 8 Using Behat, mink and SeleniumBDD in Drupal 8 Using Behat, mink and Selenium
BDD in Drupal 8 Using Behat, mink and SeleniumEugene Vozniuk
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_phpJeanho Chu
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven developmentGil Fink
 
Intro to SharePoint 2013 Branding
Intro to SharePoint 2013 BrandingIntro to SharePoint 2013 Branding
Intro to SharePoint 2013 BrandingThomas Daly
 
HTML5 : Web to the next level
HTML5 : Web to the next levelHTML5 : Web to the next level
HTML5 : Web to the next levelMohamed Azouz
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Derek Jacoby
 
Why You Need a Front End Developer
Why You Need a Front End DeveloperWhy You Need a Front End Developer
Why You Need a Front End DeveloperMike Wilcox
 
jQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web PerformancejQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web Performancedmethvin
 

Tendances (20)

The Transparent Web: Bridging the Chasm in Web Development
The Transparent Web: Bridging the Chasm in Web DevelopmentThe Transparent Web: Bridging the Chasm in Web Development
The Transparent Web: Bridging the Chasm in Web Development
 
The things we found in your website
The things we found in your websiteThe things we found in your website
The things we found in your website
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHP
 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5
 
Front End Web Development Basics
Front End Web Development BasicsFront End Web Development Basics
Front End Web Development Basics
 
Website Review with Screen Reader vs. SiteImprove
Website Review with Screen Reader vs. SiteImproveWebsite Review with Screen Reader vs. SiteImprove
Website Review with Screen Reader vs. SiteImprove
 
DITA, HTML5, and EPUB3 (Content Agility, June 2013)
DITA, HTML5, and EPUB3 (Content Agility, June 2013)DITA, HTML5, and EPUB3 (Content Agility, June 2013)
DITA, HTML5, and EPUB3 (Content Agility, June 2013)
 
5 reasons to program javascript
5 reasons to program javascript5 reasons to program javascript
5 reasons to program javascript
 
My site is slow
My site is slowMy site is slow
My site is slow
 
No folders: A workspace that organizes for you
No folders: A workspace that organizes for youNo folders: A workspace that organizes for you
No folders: A workspace that organizes for you
 
Plone 5 theming
Plone 5 themingPlone 5 theming
Plone 5 theming
 
BDD in Drupal 8 Using Behat, mink and Selenium
BDD in Drupal 8 Using Behat, mink and SeleniumBDD in Drupal 8 Using Behat, mink and Selenium
BDD in Drupal 8 Using Behat, mink and Selenium
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven development
 
Intro to SharePoint 2013 Branding
Intro to SharePoint 2013 BrandingIntro to SharePoint 2013 Branding
Intro to SharePoint 2013 Branding
 
HTML5 : Web to the next level
HTML5 : Web to the next levelHTML5 : Web to the next level
HTML5 : Web to the next level
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4
 
Why You Need a Front End Developer
Why You Need a Front End DeveloperWhy You Need a Front End Developer
Why You Need a Front End Developer
 
jQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web PerformancejQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web Performance
 
Languages of Internet
Languages of InternetLanguages of Internet
Languages of Internet
 

Similaire à How to start developing apps for Firefox OS

Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Jim McKeeth
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichunglittlebtc
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Nuxeo
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipeilittlebtc
 
DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayBojan Veljanovski
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
Jetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserJetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserlittlebtc
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsFabian Jakobs
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressDanilo Ercoli
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGGDBologna
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesAlfresco Software
 
On Again; Off Again - Benjamin Young - ebookcraft 2017
On Again; Off Again - Benjamin Young - ebookcraft 2017On Again; Off Again - Benjamin Young - ebookcraft 2017
On Again; Off Again - Benjamin Young - ebookcraft 2017BookNet Canada
 
網頁程式設計
網頁程式設計網頁程式設計
網頁程式設計傳錡 蕭
 
JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)jeresig
 
JavaScript debugging diagnostic web tools and firefox
JavaScript debugging diagnostic web tools and firefoxJavaScript debugging diagnostic web tools and firefox
JavaScript debugging diagnostic web tools and firefoxGennady Feldman
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersMark Leusink
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaGeorge Wilson
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)jeresig
 
Front end for back end developers
Front end for back end developersFront end for back end developers
Front end for back end developersWojciech Bednarski
 
Thoughts on building deployable and updatable share point solutions
Thoughts on building deployable and updatable share point solutionsThoughts on building deployable and updatable share point solutions
Thoughts on building deployable and updatable share point solutionsSerge van den Oever
 

Similaire à How to start developing apps for Firefox OS (20)

Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichung
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
 
DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development today
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Jetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserJetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browser
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPress
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best Practices
 
On Again; Off Again - Benjamin Young - ebookcraft 2017
On Again; Off Again - Benjamin Young - ebookcraft 2017On Again; Off Again - Benjamin Young - ebookcraft 2017
On Again; Off Again - Benjamin Young - ebookcraft 2017
 
網頁程式設計
網頁程式設計網頁程式設計
網頁程式設計
 
JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)
 
JavaScript debugging diagnostic web tools and firefox
JavaScript debugging diagnostic web tools and firefoxJavaScript debugging diagnostic web tools and firefox
JavaScript debugging diagnostic web tools and firefox
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developers
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
 
Front end for back end developers
Front end for back end developersFront end for back end developers
Front end for back end developers
 
Thoughts on building deployable and updatable share point solutions
Thoughts on building deployable and updatable share point solutionsThoughts on building deployable and updatable share point solutions
Thoughts on building deployable and updatable share point solutions
 

Dernier

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Dernier (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

How to start developing apps for Firefox OS

  • 1. How to start developing apps for Firefox OS Belén Albeza @ladybenko
  • 2. Firefox OS? • It’s a OS for mobile devices
  • 3. Firefox OS components Gonk Kernel + HW abstraction layer Gecko “Browser” engine (backend) Gaia UI System apps (frontend)
  • 4. App dev technologies • Native apps for Firefox OS are web apps • HTML5 • CSS3 • JavaScript
  • 5. What? No SDK? • There are Firefox Web APIs (https:// wiki.mozilla.org/WebAPI) • Phone calls, SMS’s, Bluetooth, camera, location, vibration, contacts, etc. • But they are JavaScript APIs :) • Gaia Building Blocks + JS (https:// github.com/mozilla-b2g/Gaia-UI-Building- Blocks)
  • 6. Gaia Building Blocks • Pre-made UI components, with HTML + CSS ready to copy & paste! • JS libraries to detect gestures, access to local storage, etc.
  • 7.
  • 8. What do we need to start? • Firefox Nightly (http://nightly.mozilla.org/) • B2G Simulator (https://addons.mozilla.org/ en-us/firefox/addon/firefox-os-simulator/) • Your favourite text editor
  • 10. File structure - hello/ - index.html - manifest.app - images/ - icon.png
  • 11. index.html <!DOCTYPE html> <html> <head> <title>Hello world!</title> </head> <body> <h1>Hello World</h1> </body> </html>
  • 12. manifest.app { "name": "Hello World", "description": "Lorem ipsum blah blah blah", "launch_path": "/index.html", "icons": { "128": "/images/icon.png" } }
  • 15. Tools / Web Developer / Firefox OS Simulator
  • 17.
  • 18. Distribute your apps on the web
  • 19. You don’t need to be in a marketplace window.navigator.mozApps.install(url); https://developer.mozilla.org/en-US/docs/Apps/ Getting_Started#Installing_the_app
  • 20. Stuff to be aware of... • Don’t use eval (that rules out a lot of libraries)! • Performance • Don’t use template libraries (like mustache.js) • Do you really need jQuery / mootools? • Take a look at the memory
  • 22. Features • Import ePub books from the SD Card • Sort books by author/title/last access • Table of contents • Remeber last page read
  • 23. Import ePubs (I) • Ask for permission to read the SD Card + local storage
  • 24. manifest.webapp "device-storage:sdcard":{ "description": "Required to import books from the SD card", "access": "readonly" }, "storage": { "description": "Required to store imported books" }
  • 25. Import ePubs (II) • An ePub is just a zip containing HTML + metadata • Use js-inflate + js-unzip to read this zip file • Use an extended version of js-epub to parse the contents
  • 26. Display eBooks • Code inspired by Monocle • Books are rendered using CSS3’s columns rules to create the “pages” (so content is a veeery long horizontal stripe) • To improve performance, books are divided into “chunks”, based on the table of contents
  • 27. Gaia’s BB + libs • Use of Gaia’s Building Blocks to have something pretty :) • Libs • mediadb.js (access to SD card) • async_storage.js (indexDB local storage) • gesture_detector.js (gestures)
  • 29. Resources • Wiki https://developer.mozilla.org/en/docs/Mozilla/ Firefox_OS • Sample app http://robnyman.github.com/Firefox- OS-Boilerplate-App/ • Firefox OS simulator https://addons.mozilla.org/en- US/firefox/addon/firefox-os-simulator/ • Compile B2G and Gaia https:// developer.mozilla.org/en-US/docs/Mozilla/ Firefox_OS/Building_and_installing_Firefox_OS