Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wq/store.js: re-evaluate and potentially overhaul #20

Closed
5 tasks done
sheppard opened this issue May 5, 2014 · 3 comments
Closed
5 tasks done

wq/store.js: re-evaluate and potentially overhaul #20

sheppard opened this issue May 5, 2014 · 3 comments

Comments

@sheppard
Copy link
Member

sheppard commented May 5, 2014

As the first major wq.app module(77f8903#diff-16), wq/store.js is unique in that it is the only major module with no external dependencies (other than shims and jQuery.ajax, the latter which should/could be factored out). It's time to evaluate whether there are any popular third-party localStorage-persisted Model libraries that have arisen in the last 2 years or so that fulfill similar needs and would be worth incorporating.

Specifically, the following actions need to be taken:

  • Fully document wq/store.js' existing functionality and API
  • Evaluate third party alternatives, and whether any have the same or comparable functionality
  • If a replacement is found, determine whether to keep wq/store.js as a compatibility wrapper, or switch to using the new library directly
  • If no similar libraries can be found, document why wq/store.js is unique
  • In either case, consider splitting out ds.getList() into a separate module (probably wq/model.js)
@sheppard
Copy link
Member Author

Also consider an eventual migration to IndexedDB, and an async-only API. (See #17)

@sheppard
Copy link
Member Author

One potential lib: https://github.com/mozilla/localForage

@sheppard
Copy link
Member Author

localForage looks like the best cross-platform solution for now, and won't require much in the way of immediate changes (other than #17). Eventually will want something that leverages IndexedDB's ability to query on arbitrary columns but that can wait. Will keep wq/store.js as a compatibility wrapper (the AJAX workflow in particular is still unique).

sheppard added a commit that referenced this issue May 8, 2015
 - use new model & outbox modules (see #20)
 - use promises (see #5)
 - simplify init (fixes #28)
sheppard added a commit to wq/wq that referenced this issue May 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant