14 Jun '12, 6am

Coccyx: plug up those backbone leaks

A number of projects at Pivotal have been using Backbone.js to build single page web apps. I've enjoyed using Backbone: it's lightweight, unopinionated, helps encourage good separation of concerns between models and views, and reduces a fair bit of JavaScript boilerplate by bringing just enough framework to the table. Unfortunately, it's very easy to write Backbone code that leaks - especially in the view layer. A common backbone pattern is to set up some event bindings for a view: var MyView = Backbone.View.extend({ initialize: function() { this.model.on('change', this.update, this); this.someOtherModel.on('change', this.update, this); this.boundResizeHandler = _.bind(this.resizeHandler, this); $(window).on('resize', this.boundResizeHandler); }, ...etc.. }); If your app needs to switch between several such views it is not enough to simply remove the view's DOM and null ou...

Full article: http://pivotallabs.com/users/onsi/blog/articles/2160-cocc...

Tweets

Simplifying View-View Events in Backbone using ...

pivotallabs.com 15 Jun '12, 6am

In most single-page apps, you will inevitably end up having multiple views on one page at a time. It usually starts out wi...

Ruby5 - 25 things you need to know about Backbo...

ruby5.envylabs.com 18 Jun '12, 3pm

Tribune Company open sources eight gems … New “Giant Robots Smashing Into Other Giant Robots” podcast from thoughtbot … Gr...

London Calling: BMW will make i8 plug-in hybrid engine in UK

London Calling: BMW will make i8 plug-in hybrid...

green.autoblog.com 14 Jun '12, 9pm

to curtain production of its i-series of plug-in vehicles has so far been lost in translation, even if the language is sti...

Not All Leaks of Classified Information Violate...

fas.org 13 Jun '12, 3pm

“The unauthorized release of classified information is a crime–it is a crime–because it threatens our national security an...