That's a wrap (hopefully). I'm going to hand in the manuscript later today, asking for a little extra time for the Thorax section to be updated (expecting the changes tonight). Other than that I've tried to firm up the credits, update the Pagination section and make sure we've landed any important pull requests with review.
@dcmaf If you get a chance, could you take a look at backbonefundamentals.com and let me know if you think there's anything majorly outstanding we should address before sending it out? I'll be doing the same.
I found this part however in your TodoView code example confusing.
I followed everything except up to the part - "this.$el.html( this.todoTpl( this.model.toJSON() ) );"
Can you explain what the $el.html is? And the this.todoTpl(this.model.toJSON() is for?
That would make it crystal.
Hi @firecentaur, you picked a great time to start reading! I have been helping review the content as they are preparing to release the print edition.
The next chapter, Backbone Basics, will explain what is going on in that example in more detail, including the use of $el. Basically though, $el is just a reference to the jQuery element associated with the view and the todoTpl is a reference to an Underscore template. The toJSON() call returns an object containing the model's attributes. So, altogether, the statement is replacing the html of a DOM element with the result of instantiating a template with the model's attributes.
For #397 - adds a comment making a line in the TodoView example clearer
Thanks for answering, @dcmaf. I've added a comment capturing the above to the code sample in case others get confused about it before hitting the basics chapter. Hopefully that will help.
I remember on another issue you made the suggestion of including something addressing Backbone vs other frameworks. It can get a little controversial comparing what one framework does over another so I typically favor linking up to existing discussions (either with framework authors or others). I put this together as a sort of "focus on using the right tool for the right job" type of message.
Is it worth including or should we just move this into consideration for the next edition?
@addyosmani I just posted a comment on your gist. Yes, I think that definitely helps.
@addyosmani Can you take a look at the chapter descriptions at the end of the Introduction and make sure that everything is covered? I think you broke out a few things (such as the Paginator) which may not be in there.
Well spotted. It looks like pagination would have to become chapter 9 and all chapters after it would need to be incremented by one. Does that sound right?
I think the RequireJS example was broken out as well and not sure if you want an entry there for the unit testing intro.
I think we should do RequireJS and Pagination but the unit testing section probably doesn't have enough content on it's own to be broken out.
Sounds about right.
For #397 - adding exercise and pagination to the index summary
Does the above change look good? I'm going to try resending to the publisher with this version if so.
The change looks good. The Appendix description mentions the section on upgrading to 0.9.10 which I think was removed over the weekend. I think it you take that reference out you will be good to go.
Very good catch! Change to address that coming soon.
For #397 - correction to chapter summary