Add-ons for managing data and APIs
Component needs an easy way of importing, querying, saving, and syncing external data.
The benefits of easily managing external data:
- access large datasets
- auto updating data, triggers re-render
- querying data for custom results
- saving/retrieving persistent data
- syncing data between page users
External data could be:
- third party APIs
- "flat file" content (JSON files, etc)
- databases
- distributed P2P data stored or held by all users of a page
Add-ons related to external data handling could be:
- a
useURL add-on, for URL (query string and hash path) data, based on sc0ttj/router
- a
useAPI or useQuery add-on for accessing third party APIs/endpoints, based on fetch
- a
useDatabase add-on for saving/retreiving component data to/from a persistent database backend
The add-ons should enable the following, with simple, concise code:
- use same code in Node and Browser
- fetch, parse and cache data
- handle login and auth stuff
- save data to a persistent store
- real-time updating of data (triggering page re-renders)
- syncing data for real-time interactions/collaboration between multiple users on a page
Other Libraries
Data from page URL (inc query strings and hash path):
- sc0ttj/router - steal code from it, to save state as URL query string
Fetching from third-party APIs:
Persistent data stores, with P2P data syncing:
Persistent data stores:
Non-persistent data stores, with P2P data syncing:
Others:
"In-memory" only databases (no backend, no collab):
- typicaljoe/taffydb - 1kb, very nice API, works in browsers, Node, Electron
- lowdb/lowdb - tiny, lightweight, works in browsers, Node, Electron
- TomPrograms/stormdb - 1.1kb, works in browsers, Node, Electron
- nodeGame/NDDB - 60kb, nice API, lots of features, works in browser and Node, can use localStorage
Reading
Add-ons for managing data and APIs
Componentneeds an easy way of importing, querying, saving, and syncing external data.The benefits of easily managing external data:
External data could be:
Add-ons related to external data handling could be:
useURLadd-on, for URL (query string and hash path) data, based on sc0ttj/routeruseAPIoruseQueryadd-on for accessing third party APIs/endpoints, based onfetchuseDatabaseadd-on for saving/retreiving component data to/from a persistent database backendThe add-ons should enable the following, with simple, concise code:
Other Libraries
Data from page URL (inc query strings and hash path):
Fetching from third-party APIs:
Persistent data stores, with P2P data syncing:
Persistent data stores:
Non-persistent data stores, with P2P data syncing:
Others:
"In-memory" only databases (no backend, no collab):
Reading
Promise.allto resolve multiple requests