Skip to content

Instantly share code, notes, and snippets.

@blake41
Created November 18, 2015 16:27
Show Gist options
  • Save blake41/d12156015abc91d1e450 to your computer and use it in GitHub Desktop.
Save blake41/d12156015abc91d1e450 to your computer and use it in GitHub Desktop.
- create index.html
- order matters
- load/require backbone files
- load models
- load views
- load app.js
- create an app global variable
- in an IIFE instantiate any views you need
- views initialize method
- should call its render method
- should create instances of any models you need
- should create any listeners on the model
- render method should add some html to the $el property
- attach the views html to the DOM
- view can listen for events
- you can handle an event with a function in your view
- that function should update a model
- the model should fire a change event
- the view listens to the event and does some update, maybe calls rerender
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment