RSVP/Promise - is there any difference?



Is there any difference between these two Promise under the hood? Are both cases using Ember.RSVP?

 return Ember.$.getJSON('').then(function(data) {
      return data.splice(0, 3);  
var promise = new Ember.RSVP.Promise(function(resolve) {

promise.then(function(data) {
  return data.splice(0, 3);  


They are not the same. JQuery is a and ember is using

I think RSVP.Promise has some extras that the jquery promise implementation doesn’t have. Also it used to be the case that JQuery promises were not really proper promises in the way they handled chaining but that maybe fixed now.


Wrapping a JQuery “promise” in an Ember.RSVP.Promise does not give you the correct error handling of a promise. I recommend you use the ic-ajax library. This is available via the Ember addon ember-cli-ic-ajax.