Joined March 2012
·

Salehen Shovon Rahman

Systems Engineer at Simon Fraser University
·
Delta, BC, Canada
·
·

@chorvus thanks a lot for that.

This pattern is called deferred and promises.

Not to mention, there is a whole class of different methods to solving the callback hell problem that everyone is talking about.

An alternative library is async.js. However, it doesn't handle asynchronous calls via promises.

Another one is the Q library. This one uses promises just like jQuery. If you mix Q with async, you can get elegant asynchronous calls.

@nono: that's definitely a good option.

Posted to Don't overuse $(this) over 1 year ago

This applies to everything that involves repetition. It's called the DRY (Don't Repeat Yourself) principle.

Achievements
502 Karma
33,722 Total ProTip Views