Final review #397

Closed
addyosmani opened this Issue Apr 1, 2013 · 12 comments

Projects

None yet

3 participants

@addyosmani
Owner

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.

@firecentaur

Hi there, I am very excited about this book you are writing! I am starting to read it now. I am a programmer, primarily versed with Jquery, Javascript, PHP. My framework of choice for web application is Drupal. Drupal 8 will have backbone bundled with it apparently - so I am learning it now. I just wanted to give you a small note about your writing from a noobs perspective. Firstly, I like your writing! It is clear, and enjoyable to read.

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.

Thanks!

@dcmaf
Collaborator
dcmaf commented Apr 1, 2013

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.

@addyosmani
Owner

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.

https://gist.github.com/addyosmani/5285090

Is it worth including or should we just move this into consideration for the next edition?

@dcmaf
Collaborator
dcmaf commented Apr 1, 2013

@addyosmani I just posted a comment on your gist. Yes, I think that definitely helps.

@dcmaf
Collaborator
dcmaf commented Apr 1, 2013

@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.

@addyosmani
Owner

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?

@dcmaf
Collaborator
dcmaf commented Apr 1, 2013

I think the RequireJS example was broken out as well and not sure if you want an entry there for the unit testing intro.

@addyosmani
Owner

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.

@dcmaf
Collaborator
dcmaf commented Apr 1, 2013

Sounds about right.

@addyosmani
Owner

Does the above change look good? I'm going to try resending to the publisher with this version if so.

@dcmaf
Collaborator
dcmaf commented Apr 1, 2013

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.

@addyosmani
Owner

Very good catch! Change to address that coming soon.

@addyosmani addyosmani closed this Apr 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment