Off-line Storage
One of the core architectural concepts that distinguish mobile apps from other types of app is that
they are only transiently connected to a network. There is no assurance that at any given time they
have access to a network. If an application is reliant on data this can result in the application being
unable to be used while off-line. A solution to this is to provide off-line storage of data such that
when the application is on-line, it can retrieve some set of data that the end user can use to do work
and save it locally. If the app subsequently becomes network isolated, the app can still work (to
some degree) using the local data that it previously stored.
The Worklight JSONStore
Worklight provides a concept called JSONStore. This is a component that executes client-side
within the context of a client app. It provides a storage abstraction that can be used by application
to store and retrieve data.
It provides the following high level features each of which will be discussed in more detail in later
sections.
• Data encryption
• Storage space only constrained by available storage space
• Worklight adapter integration
By default, the JSONStore functions are not included in an application and must be explicitly added
to be utilized.
We can do this through the application-descriptor editor. Open the editor and select "Optional
Features". Next click the Add... button to add a feature:
Once added it will show in the added features list:
Page 61
Comentários a estes Manuais