摘要: 异步回调的运行上下文保持(称状态保持),我看一段代码来说明何为状态保持.//传统同步写法:将查询和结果打印抽象为一个方法 functionmain(){ varid="1"; varname=db.query("selcectnamefrompersonswhereid="+id); output("personid:"+id+",name:"+name);} main();前面的写法在传统的阻塞是编程中非常常见,但接下来进行异步改写时会遇到一些困扰.//异步写法: functionmain(){ varid=&q 阅读全文
posted @ 2011-11-10 16:05 方子尚 阅读(882) 评论(0) 推荐(0) 编辑
摘要: Steve Yegge的大作 Execution in the Kingdom of Nounshttp://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.htmlTHURSDAY, MARCH 30, 2006Execution in the Kingdom of NounsThey've a temper, some of them—particularly verbs: they're the proudest—adjectives you can do anything with, but 阅读全文
posted @ 2011-11-10 11:10 方子尚 阅读(994) 评论(0) 推荐(1) 编辑
摘要: http://nodebeginner.org/index-zh-cn.html 阅读全文
posted @ 2011-11-10 10:54 方子尚 阅读(267) 评论(0) 推荐(0) 编辑