Errata

Developing Backbone.js Applications

Errata for Developing Backbone.js Applications

Submit your own errata for this product.

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.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 6
Lower down in the page

Remove an extra 'the' in the introduction as per https://github.com/addyosmani/backbone-fundamentals/commit/6685acec0b191903e76de29357caf900202ba5a5

Addy Osmani
 
May 30, 2013 
Printed, PDF, ePub, Mobi
Page 45
TodosCollection.add([ { title: 'go to Jamaica.', completed: false, id: 3 }, ]);

Fix required for removing extra comma in code sample. Here is the change that needs to be made:

https://github.com/addyosmani/backbone-fundamentals/commit/56e954bb9d1e9fac010e73d961ef4cf1597c7dc6

Addy Osmani
 
May 30, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
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

Addy Osmani
 
Jun 09, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 63
5th line down

Code fixes required for routing example. The change that needs to be made is here:

https://github.com/addyosmani/backbone-fundamentals/commit/e1c171a1c6ee7c225cae33b3628c8044b600c932

Addy Osmani
 
May 30, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 63
Top of the page

Correct window.app.* to app.* to match the code sample as per the change in:

https://github.com/addyosmani/backbone-fundamentals/commit/350bc039504d3175b88a5270cd317d8cc7c236d2

Addy Osmani
 
May 30, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 66
In the section starting Backbone sync API

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

Addy Osmani
 
May 30, 2013 
Printed
Page 80
Second paragraph

The initialize function uses a jQuery selector that doesn't match the markup.

...

initialize: function() {
this.allCheckbox = this.$('#toggle-all')[0];
}

...


Should be:

...

initialize: function() {
this.allCheckbox = this.$('#toggle-all');
}

...

Because we're selecting the element by id, only one element will be returned. The printed code results in this.allCheckbox being undefined.

Note from the Author or Editor:
Please make the suggested change as recommended by the feedback. This is a confirmed issue.

Brandon Taylor  Jun 08, 2013 
, Printed, PDF, ePub, Mobi, , Other Digital Version
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

Addy Osmani
 
Jun 09, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 87,88
Code examples

The following change for code consistency is required:

https://github.com/addyosmani/backbone-fundamentals/commit/496539ef5c11ede80cab848b776a5ba70e53a4c1

Addy Osmani
 
May 30, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 93
Code snippet at the bottom

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,
Page 129
Create the first view instance

The following minor code fix is needed:

https://github.com/addyosmani/backbone-fundamentals/commit/d8869560c1322ac8b6b73f46294ed1986dc59f1c

Addy Osmani
 
May 30, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 134
TodoMVC code example

The following change corrects the namespacing for Backbone Marionette and should be brought into the book:

https://github.com/addyosmani/backbone-fundamentals/commit/d2feddcd1a022f003e6d948597b0be09def507cb

Addy Osmani
 
May 30, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 272
Near the top

Correct the reference to jasmine.spy() as follows: https://github.com/addyosmani/backbone-fundamentals/commit/8566c9af06425e70eed54ed8cea4151ab8c99cdb

Addy Osmani
 
May 30, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 274
Top of the page

The following inline code reference typo correction needs to be made:

https://github.com/addyosmani/backbone-fundamentals/commit/9af9d9b27a4488efc05474ab51e3a8e6e6632865

Addy Osmani
 
May 30, 2013