O'Reilly logo

Sencha Touch 2 Mobile JavaScript Framework by Bryan P. Johnson, John Earl Clark

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

Going offline

Inevitably, people using your application will find themselves without Internet access. With traditional web applications, this typically means that the application was inaccessible and unusable. But, with some careful planning, you can make your mobile application available offline.

Syncing local and remote data

The first thing to think about is your data: which data will your users need even when they are offline? Let's use a simple address book example. You would probably have a model for the contacts and a store that queries your remote address book server, along with perhaps a list view to display the contacts:

Ext.define('Contact', { extend: 'Ext.data.Model', config: { fields: [ {name: 'id', type: 'int'}, {name: 'firstname', type: ...

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

Start Free Trial

No credit card required