SlideShare a Scribd company logo
1 of 27
Download to read offline
Firefox OS
  Mate Nadasdi
  @matenadasdi
Gaia - Gecko - Gonk
Gaia:
User interface application written in HTML on the top of the software
stack. (mozChromeEvent and mozContentEvent)


Gecko:
Application runtime. Networking stack, graphics stack, layout engine, a JS
virtual machine, and porting layers, etc.


Gonk:
A linux kernel, hardware abstraction layer, a porting target of Gecko.
Application Sandbox
Simple web apps on your Phone!


Write your web app as you did before

Packaged Apps

Hosted Apps

App manifest file
Packaged apps


a zip containing your whole application

have access to sensitive APIs on device

The store cryptographically signs the zip
with its private key
Packaged apps - Types

•   Privileged:
     o   Approved by Firefox Marketplace
     o   App resources are signed
     o   Allowed to use sensitive Web APIs
     o   Device permissions are explicit, user can change it in any time

•   Certified:
     o   intended for critical system function
     o   Device permissions are implicit


•   Plain:
    o    Marketplace signs it without any special authentication process
    o    Cannot use sensitive Web APIs
Hosted apps

•   Just like a regular website but application manifest

    file is essential

•   App manifest needs to be on the same origin

•   Optional Appcache manifest

•   Lower Web API permissions

•   one-app-per-origin policy
App Manifest

•   JSON

•   application/x-web-app-manifest+json mime-type

•   all paths must be absolute

•   list all Web API permissions

•   Specifies a set of Web Activities that the app

    supports
Web API

•       Simple Javascript APIs
•       Lot of mobile phone features implemented
•       Simple feature detection is a good practice: if ('vibrate' in
        navigator)



               WebRT APIs          (Permissions-based APIs)



    •    Permissions needs to be listed in app manifest
    •    There are only certified app APIs: WebSMS, WebTelephony,
         Idle, etc.
Web API Security levels
•   Granted by default

    Safe web APIs that don't expose privacy sensitive data. WebGL, fullscreen, etc.

•   Granted by user

    location, camera, file system access

•   Granted when installed

    No quota for localStorage, IndexedDB, offline cache

•   Granted by authorized store

    Privacy and security sensitive APIs such as Contacts API

•   Verified by signature

    Highly privileged APIs such as radio access (dialer)
Web activities


Share, pick an image, etc.


Delegating a task to another app


Register in app manifest or dynamically
Web API examples
+

Lets rock with HTML5 & CSS3
Responsive design

•   There are lot of screen resolutions out there, and there will be more!

•   CSS3 media queries

•   device-pixel-ratio

•   Don't be shy to create a landscape layout with orientation media

    queries
Single page application

•   Based on JavaScript framework


•   Navigation should be handled with History API


•   Views will be rendered from JavaScript templates,


    or AJAX request html responses


•   Routing is handled on client side
Data handling on client side

• IndexedDB
   o   Asnyc, transactional, noSQL

   o   asks for permission over ~50MB

• Application cache: Cache / Network / fallback (~5 MB /
  origin)

• LocalStorage - Permanent ( ~5 MB / Origin )
• SessionStorage - Session only ( System memory )
• Cookies - Not modifiable (~4KB / origin)
A quick and common example
       (Basic todo application)
Quick Layout / Flow example
Performance tips
•   Use HTML comments to keep DOM node values in the memory


•   Use worker thread for background jobs


•   Feel the GPU's power, use transforms & animations


•   Use lazy load to speed up startups


•   visibilitychange event is our friend


•   The common one: Avoid unnecessary reflow / repaint


•   Do not load every script at startup


•   Every frontend performance tip could be listed here too
Debugging - Firefox Developer Tools


• Responsive design Mode


• Remote debugging


• Web inspector
Debugging - Firefox OS simulator
Share our applications with the world!




•   For hosted applications just provide an url with a valid app

    manifest

•   Packaged applications should be uploaded to the marketplace

•   To update your application just upload a new manifest, or upload

    a new zip containing the new version

•   Firefox OS phone polls for app changes once per a day
Thanks!
Special thanks to David Walsh and Christian Heilmann for the review

More Related Content

What's hot

Widgets neil
Widgets neilWidgets neil
Widgets neil
RavingTiger
 
One Hour Translation at WPTLV
One Hour Translation at WPTLVOne Hour Translation at WPTLV
One Hour Translation at WPTLV
dsero
 

What's hot (19)

Whitebase : Assault Carrier for Micro-Services
Whitebase : Assault Carrier for Micro-ServicesWhitebase : Assault Carrier for Micro-Services
Whitebase : Assault Carrier for Micro-Services
 
Deep dive into React Portals
Deep dive into React PortalsDeep dive into React Portals
Deep dive into React Portals
 
Widgets neil
Widgets neilWidgets neil
Widgets neil
 
Api gateway : To be or not to be
Api gateway : To be or not to beApi gateway : To be or not to be
Api gateway : To be or not to be
 
Api Design
Api DesignApi Design
Api Design
 
Mean machine
Mean machineMean machine
Mean machine
 
One Hour Translation at WPTLV
One Hour Translation at WPTLVOne Hour Translation at WPTLV
One Hour Translation at WPTLV
 
Build a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsBuild a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.js
 
#SPSNYC14 translating sharepoint from beginning to ending
#SPSNYC14 translating sharepoint from beginning to ending#SPSNYC14 translating sharepoint from beginning to ending
#SPSNYC14 translating sharepoint from beginning to ending
 
Salesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 MarchSalesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 March
 
API managment providers from API Craft NYC Meetup in NYC
API managment providers from API Craft NYC Meetup in NYCAPI managment providers from API Craft NYC Meetup in NYC
API managment providers from API Craft NYC Meetup in NYC
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)
 
Pyramid web framework
Pyramid web frameworkPyramid web framework
Pyramid web framework
 
Securing SharePoint Apps with OAuth
Securing SharePoint Apps with OAuthSecuring SharePoint Apps with OAuth
Securing SharePoint Apps with OAuth
 
Web APIs
Web APIsWeb APIs
Web APIs
 
Alfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo DataAlfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo Data
 
SharePoint Apps 101
SharePoint Apps 101SharePoint Apps 101
SharePoint Apps 101
 
Realtime web open house
Realtime web open houseRealtime web open house
Realtime web open house
 
Api crash
Api crashApi crash
Api crash
 

Viewers also liked

Viewers also liked (7)

Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
 
Optimizing browser experience - App!mobile 2013 conf
Optimizing browser experience - App!mobile 2013 confOptimizing browser experience - App!mobile 2013 conf
Optimizing browser experience - App!mobile 2013 conf
 
Google Chrome DevTools: Rendering & Memory profiling on Open Academy 2013
Google Chrome DevTools: Rendering & Memory profiling on Open Academy 2013Google Chrome DevTools: Rendering & Memory profiling on Open Academy 2013
Google Chrome DevTools: Rendering & Memory profiling on Open Academy 2013
 
Frontend automation and stability
Frontend automation and stabilityFrontend automation and stability
Frontend automation and stability
 
Ustream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer ToolsUstream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer Tools
 
Measuring Front-End Performance - What, When and How?
Measuring Front-End Performance - What, When and How?Measuring Front-End Performance - What, When and How?
Measuring Front-End Performance - What, When and How?
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar to Firefox OS Weekend

Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
hotrannam
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
Nuxeo
 

Similar to Firefox OS Weekend (20)

Webapi
WebapiWebapi
Webapi
 
Rhodes
RhodesRhodes
Rhodes
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
Cross platform mobile application development
Cross platform mobile application developmentCross platform mobile application development
Cross platform mobile application development
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGap
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and Architecture
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
 
Apache Cordova
Apache CordovaApache Cordova
Apache Cordova
 
Apache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app developmentApache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app development
 
Mobile application development; Complete steps
Mobile application development; Complete stepsMobile application development; Complete steps
Mobile application development; Complete steps
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPress
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
Mobile app development
Mobile app development  Mobile app development
Mobile app development
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 

Firefox OS Weekend

  • 1. Firefox OS Mate Nadasdi @matenadasdi
  • 2. Gaia - Gecko - Gonk Gaia: User interface application written in HTML on the top of the software stack. (mozChromeEvent and mozContentEvent) Gecko: Application runtime. Networking stack, graphics stack, layout engine, a JS virtual machine, and porting layers, etc. Gonk: A linux kernel, hardware abstraction layer, a porting target of Gecko.
  • 3.
  • 5. Simple web apps on your Phone! Write your web app as you did before Packaged Apps Hosted Apps App manifest file
  • 6. Packaged apps a zip containing your whole application have access to sensitive APIs on device The store cryptographically signs the zip with its private key
  • 7. Packaged apps - Types • Privileged: o Approved by Firefox Marketplace o App resources are signed o Allowed to use sensitive Web APIs o Device permissions are explicit, user can change it in any time • Certified: o intended for critical system function o Device permissions are implicit • Plain: o Marketplace signs it without any special authentication process o Cannot use sensitive Web APIs
  • 8. Hosted apps • Just like a regular website but application manifest file is essential • App manifest needs to be on the same origin • Optional Appcache manifest • Lower Web API permissions • one-app-per-origin policy
  • 9. App Manifest • JSON • application/x-web-app-manifest+json mime-type • all paths must be absolute • list all Web API permissions • Specifies a set of Web Activities that the app supports
  • 10.
  • 11. Web API • Simple Javascript APIs • Lot of mobile phone features implemented • Simple feature detection is a good practice: if ('vibrate' in navigator) WebRT APIs (Permissions-based APIs) • Permissions needs to be listed in app manifest • There are only certified app APIs: WebSMS, WebTelephony, Idle, etc.
  • 12. Web API Security levels • Granted by default Safe web APIs that don't expose privacy sensitive data. WebGL, fullscreen, etc. • Granted by user location, camera, file system access • Granted when installed No quota for localStorage, IndexedDB, offline cache • Granted by authorized store Privacy and security sensitive APIs such as Contacts API • Verified by signature Highly privileged APIs such as radio access (dialer)
  • 13. Web activities Share, pick an image, etc. Delegating a task to another app Register in app manifest or dynamically
  • 15. + Lets rock with HTML5 & CSS3
  • 16. Responsive design • There are lot of screen resolutions out there, and there will be more! • CSS3 media queries • device-pixel-ratio • Don't be shy to create a landscape layout with orientation media queries
  • 17. Single page application • Based on JavaScript framework • Navigation should be handled with History API • Views will be rendered from JavaScript templates, or AJAX request html responses • Routing is handled on client side
  • 18. Data handling on client side • IndexedDB o Asnyc, transactional, noSQL o asks for permission over ~50MB • Application cache: Cache / Network / fallback (~5 MB / origin) • LocalStorage - Permanent ( ~5 MB / Origin ) • SessionStorage - Session only ( System memory ) • Cookies - Not modifiable (~4KB / origin)
  • 19. A quick and common example (Basic todo application)
  • 20. Quick Layout / Flow example
  • 21. Performance tips • Use HTML comments to keep DOM node values in the memory • Use worker thread for background jobs • Feel the GPU's power, use transforms & animations • Use lazy load to speed up startups • visibilitychange event is our friend • The common one: Avoid unnecessary reflow / repaint • Do not load every script at startup • Every frontend performance tip could be listed here too
  • 22.
  • 23.
  • 24. Debugging - Firefox Developer Tools • Responsive design Mode • Remote debugging • Web inspector
  • 25. Debugging - Firefox OS simulator
  • 26. Share our applications with the world! • For hosted applications just provide an url with a valid app manifest • Packaged applications should be uploaded to the marketplace • To update your application just upload a new manifest, or upload a new zip containing the new version • Firefox OS phone polls for app changes once per a day
  • 27. Thanks! Special thanks to David Walsh and Christian Heilmann for the review