Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lumbar Support

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Lumbar Support

Dos and Don'ts for Backbone Applications

Avatar for braddunbar

braddunbar

May 31, 2012
Tweet

Other Decks in Technology

Transcript

  1. $ AND AJAX Backbone.$ = qwery Backbone.ajax = reqwest Backbone._

    = wnderscore ridicwlows Thursday, May 31, 12
  2. DO BE CAREFUL WITH INNERHTML var p = document.createElement(‘p’) p.innerHTML

    = ‘<b>\o/</b>’ var b = p.childNodes[0] p.innerHTML = ‘’ console.log(b.innerHTML) Thursday, May 31, 12
  3. ZOMBIE MODELS Create New Model Create the Same Model State

    Doesn’t Match! Thursday, May 31, 12
  4. NEEDED INFORMATION var post = new Post({id: 1}) var comment

    = new Comment({id: 2, post_id: 1}) Thursday, May 31, 12
  5. PARSING BOILERPLATE this.author = new User(resp.author) delete resp.author this.comments =

    new Comments(resp.comments) delete resp.comments Thursday, May 31, 12