5 ms·
As others have said, thanks, really great tutorial. I don't know whether i'm going to go all the way to backbone (maybe?), but wherever i stop i'll have better,
by polshaw 14y ago
As others have said, thanks, really great tutorial. I don't know whether i'm going to go all the way to backbone (maybe?), but wherever i stop i'll have better, more maintainable JS.
I also have a quick question; why from the 'Creating a view' section, why do we have:
var NewStatusView = function(options) {
var statuses = options.statuses;
...
new NewStatusView({ statuses: statuses });
instead of just calling `NewStatusView(statuses)` and having `var NewStatusView = function(statuses){` ??
- kjbekkelund 14y agoI've gradually started passing a hash instead when I expect the number of arguments to increase, which I do for constructors (I hate reading code and not understand the arguments in a function call). But also, it made the change over to Backbone views easier and less "magic".