Book Image

Learning Firefox OS Application Development

By : Tanay Pant
Book Image

Learning Firefox OS Application Development

By: Tanay Pant

Overview of this book

With broad compatibility, the latest in web technologies, and powerful development tools, Firefox is a great choice for both web developers and end users. Firefox OS’s promotion of HTML5 as a first class citizen opens up the walled gardens of mobile application development for web developers. It is because of this initiative that no special SDKs are required to develop for Firefox OS. This book will help you excel in the art of developing applications for Firefox OS. It sequentially covers knowledge building, skills acquisition, and practical applications. Starting with an introduction to Firefox OS, usage of WebIDE, and then the application structure, this book introduces applications of increasing complexity with each chapter. An application that measures your tapping speed, a geolocation tagging application, and a photo editing and sharing application are the three applications that will be built from scratch. You will learn about topics such as the difference between various types of Firefox OS applications, application manifest files, offline apps, and designing principles for applications. You will also learn to test and submit the applications to the marketplace and finally maintain the repository of the Firefox OS application. By the end, you will be able to develop beautifully designed, fully-fledged, and rigorously tested Firefox OS applications and also share them at the Firefox OS Marketplace.
Table of Contents (17 chapters)
Learning Firefox OS Application Development
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The working of components under Firefox OS's hood – an example


Let's take the example of the camera application of Firefox OS. Let's think of a high-level view of what happens when we take a picture in Firefox OS's ecosystem. We open the Camera application, which is a part of Gaia. Gaia makes use of the Camera API, which is implemented in Gecko to run the application, as Gecko is the rendering engine for the operating system. Gecko then passes the requests to Gonk, which interfaces with the hardware. Gonk sends a low-level request to the chip that activates the camera and actually takes a picture.

Note

Note that the flow of control here goes from the highest layer in the abstraction layer to the lowest layer of the OS, and then finally to the mobile hardware.

All these types of access to the hardware are provided to the developer via the WebAPIs, so you don't actually have to think of or concern yourself with what lies under the hood. It feels great to drive a car, but having abstract knowledge of what actually lies under the hood can always prove to be useful.

In the preceding illustration, the purple line from Command to Action denotes the flow of control from the highest to the lowest abstraction level, and finally to the hardware.