4

I'm curious, what are the intentions of the jqXHR wrapper? Is there something about it that improves development?

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Chaddeus
  • 13,134
  • 29
  • 104
  • 162

1 Answers1

7

It implements XHR-like functionality for non-XHR transports (think JSONP, etc.) Also, it allows you do to Promises. The best place to read up on this is right in the docs: http://api.jquery.com/jQuery.ajax/#jqXHR

miketaylr
  • 1,936
  • 3
  • 15
  • 14
  • Ya, I've read that page... was more or less looking at a benefit analysis. It essentially looks like the "Promises" interface is a way to object orient the ajax response? – Chaddeus Feb 10 '11 at 00:33
  • 1
    @Chad - Like many other things jQuery, it is primarily to abstract away what otherwise requires a lot of browser-specific code. – Christian Aug 30 '11 at 11:59
  • @Christian, thanks! That is a very good thing. I've since begun using it, and I'm really digging it. – Chaddeus Aug 30 '11 at 13:13
  • There is an opinion that [jQuery Promises are broken](http://domenic.me/2012/10/14/youre-missing-the-point-of-promises/). Whether you agree or not, it's worth reading and understanding the difference. – Dan Abramov Dec 16 '13 at 10:43