Storage JSONStore

IBM Worklight delivers an API that does its work with JSONStore, consuming the WL.JSONStore class using the JavaScript-defined method. While JSONStore features allows persistent storage of JavaScript Object Notation (JSON) documents, as well as developer can utilize security by enabling data encryption such as AES (Advance Encryption Standard) with 256-bit and PBKDF2 (Password based key Derivation Function 2).

JSONStore has more features over EOC and will be time saving and easy to implement approach with other benefits such as file-based storage, data encryption, integration with Worklight Adapter, indexing, JavaScript APIs for data manipulation, and fully supported in Android and iOS platform.

By means of the JSONStore API, you can encompass the functionality of the existing adapter connectivity model to store data locally and force modifications from the client to a server.

JSONStore must be initialized on application startup with the help of this WL.JSONStore.initCollection method with success and failure callback to make sure if the device is capable of it. For CRUD operation over storage you'll find defined method under this URL: http://pic.dhe.ibm.com/infocenter/wrklight/v5r0m5/topic/com.ibm.worklight.help.doc/apiref/r_class_wl_jsonstore.html.

Simply, a single occurrence of the JSON store is supported per app. However, the instance can save countless collections. A collection is associated to an adapter by requiring the adapter selection as a chunk of the collection. You do not have to subordinate a collection with an adapter; however, if an adapter is not definite for the collection, it calls push and pushSelected, which returns an error.

The following points must be kept in mind while using JSONStore for development:

  • To test the JSONStore code, you must run this code on real device or emulator as it's not supported in Worklight supplied mobile browser simulator by IBM
  • JSONStore is only accessible from a hybrid platform; you cannot access this data from native code
  • JSON collection names must not begin with a digit or symbol
  • Data encryption can be enforced without making a connection to the server
  • Data storage is unlimited but limited to the device memory
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.236.27