flXHR+Dojo=Cross Domain Ajax Fun!

getify | Ajax, flXHR, flensed | Thursday, May 14th, 2009

Back in march, I announced the jQuery plugin for flXHR, simply the best way to do cross-domain Ajax with jQuery. It has enjoyed huge success in traffic/downloading since, and that proves that there are lots of people out there who are doing cross-domain Ajax with frameworks like jQuery and Dojo, and that people are craving for better, easier and more flexible ways of doing so. flXHR is the answer to your cross-domain Ajax woes.

Building on the success from the jQuery plugin, I’m now pleased to announce that I’ve released a Dojo plugin for jQuery which is nearly identical in functionality. Basically, all you have to do is load the ‘flXHRproxy’ Dojo plugin, and then call ‘registerOptions(…)’ to register a URL (or partial URL) destination target and a set of flXHR options to be used for that location. Then, when you later make various Ajax calls, Dojo will internally figure out if you are calling to a location that is registered and will use flXHR (or any other transports you register!) with the options you specified.

If you use Dojo, and you do cross-domain Ajax calls, I urge you to consider flXHR and flXHRproxy. Take a look at flXHRproxy documentation or give the Dojo+flXHR demo a whirl.

Typical page usage might look like this:

dojox.io.flXHRproxy.registerOptions('http://www.mydomain.com/',{xmlResponseText:false...});
dojox.io.flXHRproxy.registerOptions('http://rss.mydomain.com/',{xmlResponseText:true...});
...
dojo.xhrGet({url:'http://www.mydomain.com/something.html'...});
...
dojo.xhrGet({url:'http://rss.mydomain.com/feed.html'...});

This XHR registry concept is very powerful, as it allows you to have multiple different types of Ajax calls and transports and configurations for different types of data that you are mashing up in a single page. It takes all the guess work out of configuring your code to intelligently use the right communication method and options as needed for each Ajax call. It just simply could not get any easier to do cross-domain Ajax calls with Dojo now.

Enjoy the new world of possibilities and fun that Dojo+flXHR now gives you for doing easy cross-domain Ajax!

PS. Teaser: Coming soon, flXHR+YQL = cross-domain Ajax to literally any site on the internet! How cool is that!?

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.