Skip to content

A reusable operation queue for saving Backbone Models to the server.

License

Notifications You must be signed in to change notification settings

tomyedwab/operation-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

OperationQueue.js

A reusable operation queue for saving Backbone models to the server. Currently used in the content editing infrastructure for administrators on the Khan Academy website.

Features

  • Implemented as a mixin for any existing Backbone model class.
  • Queues up changes to Backbone models to send to the server via the standard model save() method.
  • Agnostic to where the models are loaded from or any other functionality besides saving.
  • Operations are represented by a callback function + data that is applied to the model attributes at save time.
  • Special handling for a status code 409/Conflict returned from server to refresh the model and retry.

See operation-queue.js for documentation and details.

Also check out my blog post concerning the motivation and design of this feature.

License

MIT License

About

A reusable operation queue for saving Backbone Models to the server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published