N
JS
O DE
.
revolutionwith a dynamic scopE
Dmytrii Shchadei @Metrofun
“In theory there is no difference between theory and practice.
In practice there is”.
“this” is a keyword, not a variableJavascript has a lexical scoping
Javascript SCOPEgotchas
DYNAMIC SCOPEIntentionally simplE
embedding is not implemented!!
do it yourself and have fun :)
HOMEWORKhttp://nodejs.org/api/domain.htmlhttp://www.slideshare.net/domenicdenicola/domains-20010482
PROFIT *
Better isomorphic frameworks
Loose coupling
Per-request caching
CAVEATS
** Domains have performance hit ( only ~5% rps reduce )
* Some libraries doesn’t support domains ( use domain.bind )
THANK you!
Dmytrii Shchadei @Metrofun