IBM Worklight v5.0.5 > Develop IBM Worklight applications > Data synchronization with JSONStore

Develop an app that uses data synchronization

Use the data management and synchronization feature to store data securely on a mobile device.

  1. In Worklight Studio, create an application.

      Project name (right-click) | New | Worklight Hybrid Application

    Complete the fields in this window appropriately and click Finish. A standard application structure is created.

  2. Create and deploy an adapter.

      project name (right-click) | New | Worklight Adapter

    Select the appropriate adapter type, enter an adapter name, and select the check box...

      JSON Data available offline

  3. Deploy the adapter.

  4. Retrieve a JSON object with the adapter:

      adapter name (right-click) | Run As | Invoke Worklight Procedure

    The Edit Configuration Window is displayed

  5. Select the procedure used for retrieving JSON data and click Run.

    The JSON object that is returned by the procedure is displayed.

  6. Create a local JSON store:

    1. In Worklight Studio, click...

      ...and select the project and app names.

      The Create JSON Collection wizard starts.

    2. Follow the instructions in the wizard to invoke the adapter, name the collection, and specify the searchable fields.

    3. To encrypt collections, select the check box...

        Encrypt collections

    The wizard creates a JavaScript file...


  7. Review the collection_nameCollection.js file and include its content manually in the application's .js file.

Parent Data synchronization with JSONStore