HomeAJAX & Prototype Using the jQuery Framework with Google`s Ajax Libraries API
Using the jQuery Framework with Google`s Ajax Libraries API
In this second installment of a four-part series, you will learn how to develop an AJAX-driven application that makes use of Google's Ajax Libraries API to work with the jQuery library. Using Google's API means taking advantage of Google's servers, which can be expected to react much more quickly than a single heavily-loaded server. Let's get started.
A few months ago, Google released a brand new programming interface known as “Ajax Libraries API,” whichprovides web developers with a number of intuitive methods that can be used for downloading some popular JavaScript libraries directly from Google’s servers.
The group of frameworks currently supported by this API include popular packages like Prototype, jQuery, Scriptaculous, MooTools, and Dojo. If you use some of these libraries frequently when building your client-side web applications, then it’s possible that you may want to take a closer look at the core methods that come included with this interface.
This group of articles will get you started using Google's Ajax Libraries API through numerous code samples. Thus, if you’re a strong advocate of Prototype or jQuery and want to learn how to serve these libraries via Google's servers, instead of using local copies, then go ahead and begin reading now!
And now that I've mentioned the Prototype JavaScript library, it’s time to review the topics discussed in the first installment of this series. In that tutorial I explained how to use the Google API to develop a basic Ajax application with Prototype.
In that case, I discussed the use of the “google.load()” and “google.setOnLoadCallback()” methods. These methods were used first for downloading a specified version of Prototype,and then for executing a concrete JavaScript function once the entire web document finished loading.
Indeed, working with a library like Prototype in conjunction with the Google API is a no-brainer process that only requires a minimal background in the aforementioned methods. However, as I said in the beginning, this API also supports using the jQuery framework in a truly painless fashion. Thus, this second chapter of the series will be focused on illustrating how to serve the jQuery dependencies via this handy API.
Now it’s time to get rid of the preliminaries and demonstrate how to work with this popular JavaScript package using Google's Ajax Libraries API. Let’s jump in!