Skip to content

Instantly share code, notes, and snippets.

@wookiehangover
Created December 11, 2012 16:21
Show Gist options
  • Save wookiehangover/4259967 to your computer and use it in GitHub Desktop.
Save wookiehangover/4259967 to your computer and use it in GitHub Desktop.
Backbone Change Log

New Features

  • Collection#update

  • Collection#clone

  • once

  • Event Maps

  • History.extend

  • History outside of the browser

  • View#dispose (destroy)

  • Backbone.ajax

  • Optional groups for Routes syntax

Enhancements

  • Collection#reset accepts { parse: true } option

  • Collection#add accepts { merge: true } option

  • Model#destroy() returns false if the model.isNew()

  • View#options, View#el and View#tagName can be provided as functions

  • View accepts an events option

  • Backbone extends Events object

  • Router#navigate is chainable (huh?)

  • Backbone.sync accepts emulateHTTP and emulateJSON as options

Minor Changes

  • Null and undefined are invalid model id's

  • Normalizing trailing and leading slash behavior in routes

(Potentially) Breaking Changes

  • Collection#sort triggers sort event instead of reset

  • Validation is always run if defined, even when { silent: true }

  • Model#parse is run on initialization if defined

  • View#remove now calls #dispose for event cleanup

  • Routes querystring behavior ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment