AeroGear DataManager JavaScript Specification
This is a very high level overview of the DataManager spec for the AeroGear.js library. This can also be used as inspiration for the other client libraries and is open for discussion from all points of view.
AeroGear.DataManager
Similar to AeroGear.Pipeline, this is an object used as a factory for creating new DataManager objects, which at this time are being referred to as valves in an attempt to stay with the Pipeline theme but is definitely not a name that is set in stone. A new valve is based off of adapters and planned adapters for the JS lib are memory (default), session/local storage, IndexedDB and possibly Web SQL though I believe this is no longer maintained and may be unnecessary. These objects then deal only with client side data.
Methods
read
Retrieve all data from the data store or specify a particular "record" to retrieve.
save
Save new data to the store or update existing data based on a matching unique id of some sort.
remove
Remove all data or specific data from the store.
filter
Retrieve a filtered set of data from the store and can be used by read for filtering a read. It may make sense to just combine this with read as well
Notes
Data synchronization and offline access, if handled by AeroGear, will probably be handled in DataManager as well but will have depencies on Pipeline for server communication