-
Notifications
You must be signed in to change notification settings - Fork 0
About yStore
yoxigen edited this page Jul 2, 2011
·
2 revisions
Web applications consume data. Whether it’s a simple form or a complex MVC-structured application, data is saved and retrieved.
Data may be temporary, it may be sent to a server through a web service, or persisted locally on the client. It could be a mix of all these methods.
yStore is a Javascript data manager. It provides a simple yet powerful interface through which data can be stored, retrieved and removed both persistently and temporarily.
yStore utilises HTML5's localStorage to persist data and adds several powerful features to enhance the capabilities of localStorage:
- Data of any type can be persisted and retrieved, not just strings.
- Data can be namespaced (like folders). Each namespace can be iterated individually.
- Data can have an expiration date / time.
Other features of yStore include:
- Data can be set to yStore by a function, thus enabling a connection between a data key item and a remote server.
- Data items can be updated automatically at regular intervals, to create a live data model.
- Events are available to handle data changes: onExpire, onChange, onRemove, onInit.
- The whole yStore data can be persisted to localStorage with a single function call and filled from localStorage with a single function call.
- Multiple items may be set with a single function call.