Errata for Developing Backbone.js Applications

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Page 48
After the line: Models that are present in the collection but not in the list are removed

A change in the Backbone API has left one of the code examples out of date. The change we need to make can be found here in the form of a diff between the old version and the new version:
https://github.com/addyosmani/backbone-fundamentals/commit/452af7f3bd1760336a43f197b9be3e9253840f2e

As Backbone has had a new version out since the book was completed, the following replace's the 'delete' with 'destroy' in the sentence as follows:
https://github.com/addyosmani/backbone-fundamentals/commit/5850b43f5003460b4c49c12fbc21907003c5f0db

Page 85
After app, we set a direct reference on the model for convenience.

The API for marionette has changed. Here is the change we need to make to the example on page 85 as well as the line that needs changing:
https://github.com/addyosmani/backbone-fundamentals/commit/addbf0315609601bd33109912802bf3ae7487324

The following line
app.TodoFilter = param || '';
should be inserted after the "//Set the current filter to be used"
setFilter: function( param ) {
// Set the current filter to be used
// Trigger a collection filter event, causing hiding/unhiding
// of Todo view items
window.app.Todos.trigger('filter');
}

Note from the Author or Editor:Confirmed. This should be corrected as recommended.

Anteneh Tesfaye

May 30, 2013

Printed, PDF, ePub, Mobi, Safari Books Online

Page 129
Create the first view instance

The following minor code fix is needed:
https://github.com/addyosmani/backbone-fundamentals/commit/d8869560c1322ac8b6b73f46294ed1986dc59f1c

The following change corrects the namespacing for Backbone Marionette and should be brought into the book:
https://github.com/addyosmani/backbone-fundamentals/commit/d2feddcd1a022f003e6d948597b0be09def507cb