Building Apps with Jigx
Data

Offline Solutions

2min

The Jigx platform syncs all data to a local SQL database from where it is used in Expressions and user interfaces (jigs and widgets). Once the data syncs, it is available without the need for an internet connection.

Data is synced to the device from one of five supported locations:

  • Dynamic Data: A built-in data source that automatically syncs data in real time between devices and the cloud.
  • REST Services: REST-based web services that return data in JSON format.
  • Microsoft Azure SQL: Either Azure SQL Database or Microsoft SQL Server.
  • Salesforce: A provider for syncing Salesforce.com data.
  • SOAP: A data provider for syncing data from SOAP-based services such as SAP.

When the app is online, data is synced from the cloud to the local SQLite database, from where it is accessed using data sources in s.

The command is put on a queue when data is saved to the cloud. The queue is immediately executed when the device is online, and the data is sent to the applicable cloud service. When the device is offline, the cloud commands continue to be added to the queue until the device goes online.

The best practice for a robust offline solution is to sync as much data as is needed as early as possible in the usage cycle. This is typically when the solution launches. After that, the solution design should ensure the latest data is synced to the device to avoid just-in-time data loading.

Refer to the Data lifecycles in Jigx and Syncing remote and loading local Data sections to understand how to build robust solutions that go offline.

When a solution switches from offline to online, the queue is processed on a first-in-first-out basis. does not do conflict resolution. It assumes that the cloud-based system will handle its own data integrity.