Skip to main content

Developing an Application


Applies only to Mobile Apps

Implementing Offline Synchronization

When you create a mobile application using a Silk UI template, a set of actions and blocks are made available which allow you to quickly implement offline synchronization scenarios.

How to implement offline synchronization

To take advantage of the Silk UI templates to implement offline synchronization scenarios:

1. Implement the data synchronization logic of your application using the OfflineDataSync and ServerDataSync actions. Check the samples of different data synchronization strategies you can use.

2. Trigger the synchronization logic. To trigger synchronization:

  • Automatically: base your application screens in the Layout or LayoutBlank blocks and define the points when you want the synchronization logic to be triggered in OfflineDataSyncConfiguration, such as when the device becomes online. The template implements logic that takes care of the rest.
  • Manually: invoke TriggerOfflineDataSync to start the synchronization manually.

The asynchronous processes of data synchronization are carried out in the background.

Template actions and events for offline synchronization

The Silk UI templates provide you the following actions and events to serve as starting points for the implementation of your offline synchronization scenarios:

Client actions

In the Logic tab, under Client Actions\OfflineDataSync:

Client OfflineDataSync actions

  • OfflineDataSync: action which executes the offline data synchronization.
  • OfflineDataSyncConfiguration: action where you can configure points to start offline data synchronization automatically and other advanced settings.
  • TriggerOfflineDataSync: action which starts the offline synchronization process.

Server actions

In the Logic tab, under Server Actions\OfflineDataSync:

Server OfflineDataSync actions

  • ServerDataSync: action which executes the server-side offline data synchronization.

Screen client actions and events

In the Interface tab, under UI Flows\Common:

OfflineDataSyncEvents block

  • OfflineDataSyncEvents: source block for the Layout and LayoutBlank blocks which triggers and handles the relevant events for the automatic synchronization process.
  • Was this article helpful?