Getting Started According to Google Gears about page:
First, if you haven't already, install Google Gears on your computer to be able to use the sample applications and tools.
Going Offline
The first thing you need to run a web application offline is the ability to start it without an Internet connection. This is the purpose of the LocalServer module.
For a fast introduction to taking web content offline, work through the tutorial Enabling Static Files to Work Offline using Gears. You will be introduced to the LocalServer API and the manifest file, the key components that cache your application's resources and make it available offline.
Storing User's Data
Applications that are more than just static files have data that is typically stored on the server. For the application to be useful offline, this data must be accessible locally. The Database module provides a relational database for storing data. On the Architecture page you will find a discussion of strategies for designing the local storage that your application needs.
When an offline application reconnects, you will need to synchronize any changes made in the local database with the server. There are many different approaches to synchronizing data, and there is no single perfect approach. The Architecture page describes some strategies for synching.
An additional feature of the Google Gears database is Full-Text Search, providing a fast way to search text within a database file. Read the details here.
Performance
When synchronizing large amounts of data, you may find that the database operations begin to affect the responsiveness of the browser. The WorkerPool allows you to move your database operations to the background to keep the browser responsive.
The WorkerPool is useful for any expensive operations that slow down the UI.
Next Steps
Check out the Resources and Tools on http://gears.google.com/ to download useful files and sample applications.
No comments:
Post a Comment