TodoMVC jQuery

URL: https://hyperdev.com/#!/project/maze-stealer

This is the workspace for the watchandcode.com screencast series on the jQuery version of TodoMVC.

How to Read Source Code

Why it’s important

  1. Most of your time will be spent reading, not writing.
  2. Simulates working at a company or open source project.
  3. Fastest way to learn.
  4. Reading makes you a better writer (just like English).
  5. Learn how to ignore large parts of a codebase and get a piece-by-piece understanding.

Before you start

  1. Read the docs (if they exist).
  2. Run the code.
  3. Play with the app to see what the code is supposed to do.
  4. Think about how the code might be implemented.
  5. Get the code into an editor.

The process

  1. Look at the file structure.
  2. Get a sense for the vocabulary.
  3. Keep a note of unfamiliar concepts that you'll need to research later.
  4. Do a quick read-through without diving into concepts from #3.
  5. Test one feature with the debugger.
  6. Document and add comments to confusing areas.
  7. Research items in #3 only if required.
  8. Repeat.

Next level

  1. Replicate parts of the app by hand (in the console).
  2. Make small changes and see what happens.
  3. Add a new feature.

Unfamiliar concepts

  1. jQuery.
  2. What is the role of base.js?
  3. What is the role of director.js
  4. Handlebars.
  5. uuid
  6. localStorage.
  7. JSON.

Useful links

  1. https://github.com/tastejs/todomvc/blob/master/app-spec.md

Notes

  1. Go through the debugger on .getActiveTodos and .destroyCompleted.
  2. See what this is without using bind.
  3. Talk about method chaining.