Giter Club home page Giter Club logo

ampersand-sync's Introduction

ampersand-sync

Standalone, modern-browser-only version of Backbone.Sync as Common JS module.

You probably won't use this directly, but it is used by ampersand-model and ampersand-rest-collection to provide the REST functionality.

Important note on the 1.0.x versions

In moving from 1.0.1 to 1.0.2 we switched the underlying ajax implementation from jQuery's ajax to xhr. This changed slightly the options, as well as how ajaxConfig in models/collections operated when configured as a function.

Previously ajaxConfig would be passed the current ajax parameters object for modification, now it receives no arguments and should just return options to be merged in to the ajax parameters which will be passed to xhr.

This should have been a major release both for this module and its dependents (ampersand-model, ampersand-rest-collection, ampersand-collection-rest-mixin), but unfortunately we made a mistake and published as 1.0.2, and were too slow to rollback our mistake before workarounds were in place.

As such we are leaving the current 1.0.x versions in place, but deprecated, and suggest people upgrade to the latest versions of model/collection when they can which will contain the new implementation of xhr.

This should only affect your if you're using ajaxConfig as a function. If so you'll need to return the options you want to add, rather than expecting to be passed a params object to your ajaxConfig function. If you're having trouble ping us in freenode #&yet or on twitter: @philip_roberts & @henrikjoreteg.

browser support

testling badge

Part of the Ampersand.js toolkit for building clientside applications.

install

npm install ampersand-sync

running the tests

npm test

Tests are written in tape and since they require a browser environment it gets run in a headless browser using phantomjs via tape-run. Make sure you have phantomjs installed for this to work.

You can also run npm start then open a browser.

credits

All credit goes to Jeremy Ashkenas and the other Backbone.js authors.

If you like this follow @HenrikJoreteg on twitter.

license

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.