jQuery 1.3 and flXHR: a match made in heaven!

getify | Ajax, flXHR, flensed | Wednesday, January 14th, 2009

On the occasion of jQuery’s third birthday, they announced today the hugely anticipated 1.3 release of the library. Listed in the “Ajax” section is a reference to our flXHR project, and the new ‘xhr’ callback (transport override) they introduced, which helps flXHR work directly and efficiently as an XHR replacement with jQuery, instead of the patched/hacked hoops we went through before.

This is an important and exciting progression, not only for the flXHR project, but for XHR in general, as I hope flXHR will continue to inspire others to rally around “XHR Clones” (that is, XHR methodologies which speak the native XHR API) as a better way of solving cross-domain issues. The roadblock in jQuery of XHR override now being removed, there should be no reason why flXHR can’t be joined by other efforts, giving users and authors more (and better!) options for cross-domain scripting.

In accordance, I’ve updated the flXHR demo code sample for jQuery integration in the demos section (see specifically demo #7e). It now uses the ‘xhr’ callback as part of the ajaxSetup(…) default options setup to register flXHR for use by jQuery. This is the current ‘best practice’ for how to integrate flXHR into jQuery.

Moreover, the “Ajax” section in that jQuery release announcement also mentions the XHR Registry plugin (written by Ariel Flesler), which allows easy management of multiple XHR-like transport methods. I am working on a flXHR plugin for jQuery which plug directly into that and will leverage this new Registry. This should prove to be an even better way to integrate flXHR into your jQuery usage, while preserving the ability to use other methods alongside in the same code. For instance, you may want to use flXHR for some types of communication, and the JSON ajax native to jQuery for others, and still yet another XHR-clone for some other purpose. This registry will make that drop-dead easy.

I’m hoping I’ll be able to make that plugin public soon, as soon as I get some review and (hopefully!) approval on its approach. Keep an eye out for that to be released here soon.

In the meantime, the great news is that flXHR and jQuery (personally one of my favorite JS libraries, and used heavily all over this site) play well in the same sandbox now, and that’s just good news for us all!

Congratulations to the jQuery team on their birthday and on this monumental release. Keep up the great work!

Bookmark and Share

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.