Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Some minor tweaks to spacing #11

Closed
JustinDrake opened this issue Dec 22, 2011 · 4 comments
Closed

Some minor tweaks to spacing #11

JustinDrake opened this issue Dec 22, 2011 · 4 comments

Comments

@JustinDrake
Copy link
Contributor

  1. Consider expanding "qSA" for the new-comer.

  2. "It's considered optional" -> it is optional?

  3. "title = myPhoto.get("title")" -> too many spaces

  4. "Accessing Model.attributes directly is fine for reading or cloning data, but ideally shouldn't be used to for attribute manipulation." -> Jeremy recommends not touching at Model.attributes at all. For reading or cloning data, he suggests toJSON.

  5. "in scenario where" -> a word is missing

  6. There are minor spacing consistency problems in the fragments of code throughout. For example "_.template( $("#results-template").html());"

  7. In the "What is 'el'?" section you don't emphasize that you can use a combination of the methods to define el

  8. "render() is a function that should always be overridden" -> render() is optional

That's all for now. Let me know if this is useful.

@addyosmani
Copy link
Owner

@JustinDrake Very useful. Thanks so much for putting these together.

I'll focus on getting as many of the items on your list addressed for tomorrow's round of updates as possible. I don't believe there's anything here that I disagree with at all.

@addyosmani
Copy link
Owner

@JustinDrake

I've made some updates to cover 1, 2, 3, 4, 5, 7 and 8.

In terms of 6, I think you make a valid point about spacing. I was considering following the jQuery style guidelines for general spacing across most of the book (which would require a further update), however I'm not sure how well this balances with how most Backbone developers style their code.

For reference, here's the style guide: http://docs.jquery.com/JQuery_Core_Style_Guidelines

@addyosmani
Copy link
Owner

(updated the issue title to reflect changes, let me know if further work is required on any). Thanks!

@addyosmani
Copy link
Owner

Closing for now. A style guide for the book is being worked on and will be getting applied in mid Feb.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants