BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Resources to Start Developing for Firefox OS

by Sergio De Simone on Feb 06, 2014 |

Firefox OS, developed by Mozilla, pursues “the goal of building a complete, standalone operating system for the open web” and lets users install and run applications created using HTML, CSS, and JavaScript. It is based on Linux and Mozilla's Gecko and is a completely open stack that is 100 per cent free from proprietary technology.

Contributing to Firefox OS

Firefox OS is fully open source and can be cloned from GitHub. On Mozilla Developer's portal, you can find fully detailed instructions to build and install it on an emulator or mobile device, e.g., an Android handset configured for dual boot.

Firefox OS core technologies are organized in three major layers:

  • Gaia, which is the user interface of Firefox OS. Gaia includes, among other things, a lock/home screen, telephone dialer and contacts application, plus the classic phone apps: mail, calendar, calculator and marketplace. Gaia is written entirely in HTML, CSS, and JavaScript.
  • Gecko, which is the OS application runtime and implements open standards for HTML, CSS, and JavaScript. Gecko includes a networking stack, graphics stack, layout engine, and JavaScript virtual machine.
  • Gonk, which consists of a Linux kernel and a user-space hardware abstraction layer (HAL) and is the lower level OS on which Gecko runs. Gonk exposes to Gecko interfaces to get, e.g., direct access to the full telephony stack or to the display framebuffer, which are not usually accessible to Gecko on any other OS.

Among the skills required to contribute to Gonk and Gecko is knowledge of C++, while knowledge of JavaScript or HTML/CSS is required to be able to contribute to Gaia.

A fundamental resource for contributing to Firefox OS is bugzilla, Mozilla's defect database. Apart from choosing and fixing any bug from bugzilla, Mozilla has made an effort to help newcomers to get acquainted with the platform and processes by establishing mentored bugs. Mentored bugs should contain enough information to get started and also feature a mentor who has committed to help along the process. If no appropriate mentored bugs are available, an older “good first bug” list could offer a useful starting point.

Once fixed the bug, the developer should submit her patch for review and finally have it checked in by someone with enough privileges.

Developing Apps for Firefox OS

If you'd rather not get your hands dirty with the lower-level OS components, you can develop an app running on Firefox OS. The basic tools for Firefox OS app development are the latest Firefox browser, Firebug, and the Firefox OS Simulator Addon.

More useful resources to know about are:

  • Boilerplate app: a basic template showing an app's structure and WebAPI usage;
  • IndexedDB: an API for client-side storage of significant amounts of structured data, whereas DOM Storage is suitable to store smaller amounts of data;
  • App Manifest: a manifest is one of the key things distinguishing an Open Web App from a website. It is a JSON file with a name and description for the app, and it can also contain the origin of the app, icons, and the permissions required by the app, among other things;
  • App Manager: a set of tools to manage local apps, devices, and development toolboxes (inspector, debugger, etc.);
  • Brick web components: a specification to support HTML5 reuse through components;
  • Firefox OS style guide: human interaction guideline describing all elements of appearance and UI behavior.

Mozilla Rep Shafiul Azam has also made available a presentation describing the basic steps to develop an app for Firefox OS.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT