English | Site Directory

Sample Applications

This page lists sample applications that use Gears API. Sample code is found in the /samples directory of the the zipfile provided below, or by using the view source feature of your browser.

Download the sample code from the Resources and Tools page.

 


"Hello, World" Samples

Note : To see the sample applications working, you must first install Gears.

Simple Database Demo
Shows how to read and write data locally using the Database module.

Simple ResourceStore Demo
Uses the LocalServer module to capture a URL so that it can be viewed while offline.

Simple ManagedResourceStore Demo
Uses the LocalServer module to capture a versioned set of URLs, and updates the entire set to a new version.

Simple WorkerPool Demo
Performs a long-running computation without blocking the UI, using the WorkerPool module.

Simple Shortcut Demo
Shows how to create desktop shortcuts using the Desktop module.


Sample Application: Gearpad

Gearpad is simple web-based notepad which allows you to read and write notes, even offline. Gearpad transitions between online/offline states seamlessly, even when the network connection is intermittent.

Source location: /samples/gearpad

Modules used: Database, LocalServer.

To run Gearpad:

  • Set up a PHP server and a MySQL database
  • Create a database using the db.sql script
  • Place the Gearpad files under you PHP server's document root
  • Customize _dbconfig.php if necessary