Master class in A+ promises, RSVP and Ember

One of the things I continue to struggle with is dealing with is some of the finer points and nuance with async behavior and promises. I fear my brain is hardwired to think in synchronous terms.

I am wondering if anybody knows of any really great resources that target this topic?

  • Good presentations (video and slides)
  • Blog posts
  • Particularly interesting code examples from the ember source code or other projects
  • Annotated source code and didactic and instructive examples of JSBins.

If you know of a good link or resource please comment.

Thanks.

1 Like

I agree that it takes some time getting used to. It’s pretty well documented here:

If you’re into learning through reading code, then check out the following:

Also the jQuery website provides tons of examples that can help.

Thanks @kgish I have looked at the RSVP and API docs. But probably need to read closer.

The biggest problem I have is finding clear and easy to grok examples of chaining. Where a whole series of thenables are processed in a deterministic way.

Also, what about the case where you have to loop over a collection of async promise objects and ensure that each one has resolved BEFORE you proceed to next item in chain?

What about recursion patterns drilling down into a nested hierarchy of promises?

I think mostly this is a syntax question. I will have to check out the RSVP source. I was just hoping for some annotated source code that shows this in practice.

I think I should probably go peruse router facelift code that @machty did.

Also, want to better understand what exactly is happening when ember “wraps” a promise.