Live data from Hacker News

Backbone.js Tutorial - by noob for noobs

thomasdavis.github.com

21–22 of 22 posts

Re: Backbone.js Tutorial - by noob for noobs

#21

Earlier quoted context omitted.

Of course you're right, they're not identical, but I don't think there's any practical difference between them here - they both initiate the view; but using the window namespace seems more readable, and is an established idiom. Maybe it is intentional, but I don't think so?

but that would assume a browser, right?

It does, but as catshirt says, that's probably reasonable. Especially as jQuery assumes a browser (and relies on the window namespace) too - so it wouldn't be suitable for a browserless environment anyway...

Re: Backbone.js Tutorial - by noob for noobs

#22
post #8

Earlier quoted context omitted.

Yeah, that ought to be in the controller or provided in a helper method outside the model.

Backbone Views and standard MVC controllers are synonymous so I placed it in the Backbone View.

Ah! Thanks for clearing that up. I haven't gotten around to dabbling in Backbone yet.
Post reply on HN