O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning Firefox OS Application Development

Book Description

Learn to design, build, and deploy your Firefox OS applications, built with web technologies, to the Firefox Marketplace

About This Book

  • Create beautiful and interactive Firefox OS applications by applying your knowledge of web development
  • Cater your applications to a huge number of users by porting them to the Firefox OS
  • A step-by-step learning workflow with real-life applications to demonstrate the concepts

In Detail

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.

What You Will Learn

  • Install, use, and access the Firefox OS simulator with the help of WebIDE
  • Get to know about application manifest files and the essential difference between web applications and Firefox OS applications
  • Create an application that measures the tapping speed of the user
  • Create an application that allows a user to check in at a place with geolocation tagging
  • Access device-specific features with WebAPIs and implement these by building a photo editing and sharing application
  • Submit your own applications to the Firefox Marketplace and share them with others
  • Professionally maintain the code of your application with the help of Github and deploy your hosted applications to OpenShift

Who This Book Is For

This is a practical guide that uses hands-on examples to teach you how to create applications for Firefox OS and also how to port applications to Firefox Marketplace. This book is intended for developers who want to build applications for Firefox OS. An understanding of HTML5, JavaScript, and CSS is required.

Style and approach

This book is an easy-to-grasp workflow with practical examples of real-world applications such as Clickr, Check In!, and FotoFox. Each chapter explains the concepts, which are then reinforced as they are demonstrated in an application or a flowchart.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. Learning Firefox OS Application Development
    1. Table of Contents
    2. Learning Firefox OS Application Development
    3. Credits
    4. Foreword
    5. About the Author
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    9. 1. Introduction to Firefox OS
      1. Introducing Firefox OS
      2. The need to develop applications for Firefox OS
      3. The architecture of Firefox OS
        1. Mobile hardware
        2. Gonk – the kernel
        3. Gecko – the engine
        4. Gaia – the interface
        5. Firefox OS applications
      4. The working of components under Firefox OS's hood – an example
      5. HTML5 and open web applications
      6. The security model of Firefox OS
      7. Devices running Firefox OS available in the market
      8. Summary
    10. 2. Running Firefox OS Simulators with WebIDE
      1. Introducing WebIDE
      2. Installing and creating new apps by using WebIDE
      3. Using developer tools in WebIDE
      4. Browsing other runtime applications
      5. Uninstalling applications in Firefox OS
      6. Summary
    11. 3. Getting Your Hands Dirty – Firefox OS Apps
      1. Introducing Firefox OS apps
        1. Packaged and hosted applications
      2. Security access levels (permissions)
      3. Building our application's manifest file
        1. Understanding the application's manifest files
        2. Directory structure of the application
        3. Constructing the index file
        4. Constructing the stylesheet
        5. Constructing the application logic
      4. Running our application on the simulator
      5. Running the application as a hosted application
      6. Summary
    12. 4. Diving Deeper with the Fox Creating Richer Apps
      1. Making hosted applications installable
      2. Making hosted apps work offline with AppCache
      3. Building Check In!
        1. Installing and testing Check In!
      4. Summary
    13. 5. Making Applications Visually Appealing – Style Guide
      1. Basic design guidelines
      2. Avoiding UI blunders
      3. Gaia Building Blocks
      4. Checking responsiveness with responsive design view
      5. Summary
    14. 6. Emerging a Guru – Learning Web APIs
      1. Introducing Web APIs
        1. Web and Privileged APIs
        2. Certified APIs
      2. Web activities
      3. Building FoxFoto
        1. The HTML file
        2. The underlying JavaScript code
        3. View previous functionality
      4. Summary
    15. 7. Testing Your Firefox OS Application
      1. Introducing quality assurance
        1. Unit testing
      2. Using the Firefox developer tools for debugging
        1. Console
        2. Profiling performance by using the profiler
          1. Call tree
          2. Flame chart
          3. Frame rate
      3. Improving the app's performance
      4. Using the App Validator
      5. Spoof Firefox OS Add-on
        1. What the Spoof FxOS add-on does?
      6. Summary
    16. 8. Firefox Marketplace – Setting up Your Bazaar
      1. Firefox Marketplace
      2. Submitting your application to Firefox Marketplace
      3. Updating your application in Marketplace
      4. Marketplace review criteria
      5. Publishing paid applications in Marketplace
      6. Porting existing web apps to Firefox OS
        1. Conversion of a web app to a hosted Firefox OS application
      7. Summary
    17. 9. Maintaining Your Firefox OS Application Code Professionally
      1. Setting up an account at GitHub
      2. Version controlling your application
      3. Hosting apps on RHCloud via Git
      4. Summary
    18. Index