News for hackers. Stuff that matters.
Re:Multiple Simultaneous Ajax Requests (with one callback) i... by wildpeaks on Saturday February 15, 2014 @03:15AM (#7243087)
Like many, I had written myself a similar utility some years ago because "I need several stuffs that don't depend on each other, so they could be downloaded or calculated at the same time to get the end result faster" is a pattern that often comes up.

Nowadays I use "async.js" (https://github.com/caolan/async): does the same, but with extra features.

It doesn't rely on jQuery unlike the snipplets of the article, so it's useful when you're aiming for vanilla or want to share code with Node.

It's far from the only library of this type, but I like it because it's reliable and has a good balance of simple yet tweakable for uncommon workflows.

Re:Multiple Simultaneous Ajax Requests (with one callback) i... by wildpeaks on Saturday February 15, 2014 @03:17AM (#7243089)
I also like promises-style solutions, but in practice it felt like it needed more things modified to work with them than async when mixing with third-party libraries required by projects, but that's more a gut feeling than backed by hard numbers, so I'll reevaluate that assertion when the right project comes along.