via Introduction to Data Modeling with JSData.
Inspired by Ember Data, JSData is a framework-agnostic, storage-agnostic, in-memory data store.
JSData’s adapters handle communication with various storage layers, such as
localStorage, Firebase, RethinkDB, or your RESTful backend.
In a typical scenario, you load data into the store, which maintains a single representation of every unique record coming from your storage layer. The data store offers an API for read, update, and delete operations, which are executed in your storage layer by an adapter, with the results finally synced back to the store. This is your Data or Model layer.
The Model layer is typically where your business logic resides–where you manipulate your data. There are many variations on this pattern, and JSData can work with your preferences.
JSData runs in the browser, communicating with storage layers such as
localStorage, Firebase, your RESTful backend (HTTP target), etc.
JSData also runs in NodeJS, where adapters for MongoDB, Redis, RethinkDB, MySql/Postgres/SQLite, etc. are available.
JSData presents a uniform API for executing your typical CRUD operations against any storage layer for which an adapter is available. You can easily combine adapters for more complicated data management.
It is easy to add JSData to your project. Let’s get started: