top | item 8274363

(no title)

bellerocky | 11 years ago

Once you read the book, the docs and have built something I recommend checking out the source code too. It's very readable.

https://github.com/meteor/meteor

I've checked out the packages, the ddp, the binary json stuff, etc it's all in there. Except for all the var self = this; stuff, I quite like it. They have really smart people over there.

discuss

order

brbcoding|11 years ago

What would a better alternative be for `var self = this` ? I use it all the time, never thought of it as an anti-pattern as long as it's only declared where you actually need it.

jasonlotito|11 years ago

> What would a better alternative be for `var self = this` ?

    function foo(){};
    setTimeout(foo.bind(this),1000);

That being said, I'm not entirely crazy about that method as well.

prezjordan|11 years ago

A billion binds on every nested function you see. It's gross :)