Tuesday, January 26, 2016

Fast, Lightweight Data Storage for Cordova Apps with LokiJS

In this tutorial we’ll be creating a note taking app with Cordova and LokiJS. We’ll be using the Ionic Framework to handle the app structure and UI interactions. Here’s how the final app will look:

What is LokiJS?

LokiJS is a fast, in-memory document-oriented datastore for node.js, browsers and Apache Cordova that provides a comprehensive API for storing and retrieving data. Unlike localStorage, with LokiJS there is no need to stringify for storage and access. LokiJS stores data to localStorage by default, but you can use other storage methods with ‘persistence adapters’, including an ‘IndexedAdapter’, which uses IndexedDB for persistence. For this tutorial we’ll be using the FileSystem adapter which stores the data using a JSON file saved in the FileSystem.

Continue reading %Fast, Lightweight Data Storage for Cordova Apps with LokiJS%


by Wern Ancheta via SitePoint

No comments:

Post a Comment