SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
hernanibf
 
My site is slow
My site is slowMy site is slow
My site is slow
hernanibf
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
Jeanho Chu
 
Intro to SharePoint 2013 Branding
Intro to SharePoint 2013 BrandingIntro to SharePoint 2013 Branding
Intro to SharePoint 2013 Branding
Thomas Daly
 
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
dmethvin
 

Was ist angesagt? (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
 

Ähnlich wie How to start developing apps for Firefox OS

MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichung
littlebtc
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
Nuxeo
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
littlebtc
 
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
littlebtc
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPress
GGDBologna
 
網頁程式設計
網頁程式設計網頁程式設計
網頁程式設計
傳錡 蕭
 
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
Gennady Feldman
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
jeresig
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

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