News for hackers. Stuff that matters.
Re:Hello Backbone.js - A step-by-step tutorial by jashkenas on Tuesday June 07, 2011 @10:47AM (#2629314)
Usually that's the case -- but if you know for certain that there's a one-to-one relationship between a model and it's view, then there's no harm in having a direct reference for convenience. Pragmatism > Purity, where UI code is concerned.
Re:Hello Backbone.js - A step-by-step tutorial by StavrosK on Tuesday June 07, 2011 @10:50AM (#2629329)
I agree with you. I'm concerned about memory leaks from the circular references, though.
Re:Hello Backbone.js - A step-by-step tutorial by jashkenas on Tuesday June 07, 2011 @11:02AM (#2629379)
Circular references are garbage collected -- no need to worry about them.

You might be thinking of a terrible old IE bug where circular references between JavaScript objects and DOM nodes were never collected, but that's never been an issue with JavaScript-only references.

Re:Hello Backbone.js - A step-by-step tutorial by StavrosK on Tuesday June 07, 2011 @11:48AM (#2629589)
Oh, I didn't know that. That alleviates many of my concerns, then, thank you.