The API currently provides access to these open source libraries:
The scripts for these libraries can be accessed directly using a
tag or via the Google AJAX API Loader's
If you are a mashup developer that currently utilizes AJAX or if you are looking to utilize these frameworks, it is worth checking out this API, as it has good potential to streamline your development efforts while improving the user experience. Initially it may seem odd to link to these libraries via Google's API when you can host these libraries locally on your web server, but once you delve into the rationale behind consolidation of these libraries you begin to realize that this approach has several benefits, including speed optimization and consistent versioning.
Dion Almaer has a great post on Ajaxian that gives more detail on the many benefits of using this approach, including:
- Caching can be done correctly, and once, by us... and developers have to do nothing
- Gzip works
- We can serve minified versions
- The files are hosted by Google which has a distributed CDN at various points around the world, so the files are "close" to the user
- The servers are fast
- By using the same URLs, if a critical mass of applications use the Google infrastructure, when someone comes to your application the file may already be loaded!
- A subtle performance (and security) issue revolves around the headers that you send up and down. Since you are using a special domain (NOTE: not google.com!), no cookies or other verbose headers will be sent up, saving precious bytes.
Not sure which library to use for your mashup? We have provided a brief roundup of the libraries below to give you an idea of some potential uses.
The Prototype framework, developed by Sam Stephenson, is ideal for AJAX calls and polling. From the Prototype web site:
script.aculo.us, developed by Thomas Fuchs, is an add-on to the Prototype framework that allows you to provide some nifty effects and drag/drop functionality for elements on a web page. From the script.aculo.us web site:
script.aculo.us provides a good variety of effects, including fading, sliding, and resizing. Other UI functionality includes easy creation of accordion and slider menus. Given its close relationship to the Prototype framework, it's no surprise that many of the same sites that use Prototype also use script.aculo.us.
Initially developed by Valerio Proietti, MooTools is described as:
MooTools is similar to jQuery in some ways, although it has been developed with a different approach. The MooTools library includes event calls, effects, AJAX calls, and additional plugins such as sliders and sortable lists. Some of the sites that use MooTools include Vimeo, CNET, and GameSpot.
Dojo provides several types of functionality. As with jQuery, script.aculo.us and MooTools, it can be used for animation effects and AJAX calls, as well as for user interface design through 'skinnable' widgets called Dijits. Ning, AOL, and Plaxo among many others use the Dojo Toolkit.