Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the best strategies for using multiple AJAX libraries?

What experience can you share about using multiple AJAX libraries?

There are useful features in Prototype, some in jQuery, the Yahoo library, etc. Is it possible to include all libraries and use what you want from each, do they generally all play nicely together with name spaces, etc. For the sake of speed is there a practical limit to the size/number of libraries to include or is this negligible? Are there pairs that work particularly well together (e.g. Prototype/Scriptaculous) or pairs that don't?

like image 214
Edward Tanguay Avatar asked Sep 13 '08 06:09

Edward Tanguay


People also ask

Can we execute run multiple AJAX requests simultaneously in jquery?

There is a requirement to make multiple AJAX calls parallelly to fetch the required data and each successive call depends on the data fetched in its prior call. Since AJAX is asynchronous, one cannot control the order of the calls to be executed.

How do I stop multiple AJAX calls?

}); If isLoading is false, the AJAX call starts, and we immediately change its value to true. Once the AJAX response is received, we turn the value of that variable back to false, so that we can stop ignoring new clicks.


2 Answers

You could use all those libraries, but I highly recommend against it. Downloading and executing that much JavaScript will most likely choke the browser and slow down your user's experience. It would be much better from a user's perspective and a developer's to pick one. Less context/architecture switching and less code to maintain.

Like other answers have said, most don't conflict.

See Yahoo!'s Exceptional Performance site for more info.

like image 161
Ryan Doherty Avatar answered Sep 22 '22 07:09

Ryan Doherty


You could use Google AJAX Libraries API. It provides a common distribution network and a loading architecture for jQuery, prototype, script.aculo.us, MooTools and dojo

like image 23
Alejandro Bologna Avatar answered Sep 21 '22 07:09

Alejandro Bologna