SlideShare a Scribd company logo
1 of 29
Download to read offline
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

More Related Content

What's hot

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
 

What's hot (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
 

Similar to 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
 

Similar to 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
 

Recently uploaded

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 interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[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.pdfhans926745
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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 MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
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 Nanonetsnaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Recently uploaded (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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
[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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

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