backbone-fundamentals icon indicating copy to clipboard operation
backbone-fundamentals copied to clipboard

Possible idea for chapters 3-5

Open wibblymat opened this issue 13 years ago • 2 comments

In my review issue for chapter 3 I mentioned that it was very long. My only comment remaining for chapter 5 would be that we still repeat a lot of ground work in setting up the app, even if we do go through it at a good pace.

One way that we might address this is to restructure chapters 3 to 5 so that they present one long Todo app example.

Chapter 3 deals with setup, dependencies, models and the basics of collections. At the end it should have covered everything on those topics from current chapter 3 while building the relevant parts from the app. The index.html doesn't even contain the templates and the views and router aren't mentioned.

Chapter 4 is events, views and routers.

Chapter 5 is the sync API (starting with localStorage as in the TodoMVC implementation), the Underscore utility methods and the sync API. Then a brief example of creating a node/express/mongodb server to persist to instead of localStorage.

This is just an idea. Its a fairly big change at this late stage and I can't commit to doing it myself (my wife is due to give birth within the next three weeks!)

wibblymat avatar Feb 19 '13 22:02 wibblymat

I like the idea, though I agree it would be quite a bit of re-work at this point.

Maybe split the existing content along the lines that Mat outlined and insert the existing Exercise 1 between his Chapter 4 and Chapter 5. The only problem would be that Exercise 1 uses the localStorage and sync API... that could be addressed by scaling back the example to remove the persistence or by explaining that it will be discussed in an upcoming chapter. Another alternative would be to add a second Exercise which would add the localStorage to the non-persistent code and discuss the sync API (the #314 content could go there). The third (current second) exercise could probably be left as-is or reworked to be a Todo variant using a server instead of local storage.

dcmaf avatar Feb 20 '13 04:02 dcmaf

I think that this is a good idea but is something that as @dcmaf mentioned would require a lot of re-work. I'd like to keep this issue open for consideration for the future however. We might be able to do this for the next edition.

Thanks for sharing your suggestion, @wibblymat!

addyosmani avatar Feb 22 '13 00:02 addyosmani