atom feed6 messages in org.apache.incubator.callback-dev[Node 101] Part 2: Avoid the Triangle...
FromSent OnAttachments
Brian LeRouxDec 12, 2013 3:10 pm 
Josh SorefDec 12, 2013 3:40 pm 
Brian LeRouxDec 12, 2013 4:32 pm 
Brian LeRouxDec 12, 2013 4:32 pm 
Anis KADRIDec 14, 2013 10:23 pm 
Marcel KinardDec 16, 2013 10:17 am 
Subject:[Node 101] Part 2: Avoid the Triangle of Doom
From:Brian LeRoux (b@brian.io)
Date:Dec 12, 2013 3:10:51 pm
List:org.apache.incubator.callback-dev

Flatten your async code. New fashion advocates promises, generators, events, or one of the streams apis.

The classic method is to write small testable modules (see part 1) and flatten your tree.

Turn code that looks like this [1] into this [2].

[1] https://github.com/apache/cordova-js/blob/b75096a1bade9ca6aa0d38a2039fd922ad7c1a95/test/runner.js#L99-L136 [2] https://github.com/apache/cordova-js/blob/ced04a4ec71f144dd2cd6c2e9392e3b1fc725ec1/tasks/lib/test-browser.js