O'Reilly logo

Creating Mobile Apps with Sencha Touch 2 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

Updating the application for Sencha.io

Now that our application is registered, we need to set up the stores to use Sencha.io. We will also set up our controller for the application and show you how to override the Carousel component to make it work with a data store.

Updating the stores

Our original stores were simple local storage for testing. We are going to edit these now to use Sencha.io to store our data. Most of these changes will be in the proxy section. For example, the DeckStore code should be updated to look like this:

Ext.define('MyApp.store.DeckStore', {
    extend: 'Ext.data.Store',
    requires: [
        'MyApp.model.Deck'
    ],

    config: {
        autoLoad: true,
        model: 'MyApp.model.Deck',
        storeId: 'DeckStore',
        proxy: {
            type: 'syncstorage',
            id: 'decks',

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