Tag Archives: deffered

Proper asynchronous with Dojo

Not long ago, I was not really dealing as I should with asynchronous development in javascript. For instance, when I had to launch several asynchronous process and wait for them all to all complete, I was using a counter and decreasing it in the callback method until 0. Coming from the Java world and being use to synchronize/join/notify which make this so easy, I thought it has to be something better than this. And of course like always with Dojo, there is.

The solution lies in the dojo/Deferred, dojo/promise/Promise and dojo/promise/all classes.
Continue reading