Open tomkit opened 11 years ago
:+1:
Don't know if it is about the Promises/A spec, but I found the suggested methods very demanding in terms of development cycle. The jQuery deferred style implies a really rapid coding style.
Me and my team loves to do .done()
on development along with some initial .fail()
, then start to add more .fail()
s at the debug stage, we already found this approach very constructive.
I wrote a quick wrapper API around whenPromise() to be more like jQuery's deferred object syntax: https://github.com/tomkit/promised-io-deferred. Would love to get people's thoughts on the pros/cons of the different syntax styles. Personally I found myself being lazy with anonymous functions with whenPromise() and it leads to having more nested code.