Does there exist a micro-framework for use in browser (IE-support is optional) which provides a convenient document store functionality that meets the requirements below :
- It should support getters and setters that can handle nested objects.
- It should be observable – updating an object, adding additonal attributes to objects can be watched for change.
- Efficient filtering / querying functionality.
It would be nice if the document store can be persisted using IndexDB but persistence is not a strict requirement.
The best option I have found so far is Nathan Sobo’s Monarch.
Quoting the description :
While it supports requirements 2,3 out of the box, 1 can be simulated through standard relations between tables. If the backend database is relational, then it is trivially easy to replicate the same structure (along with the associated table relationships) on the client.
If relations between tables are not a requirement, then TaffyDB by Ian Smith also seems to be a good option, though I haven’t looked through it thoroughly.