mandag den 28. juli 2008

5 Ajax Libraries to Enhance Your Mashup

Web 2.0 når det er bedst

Web 2.0 at its best


5 Ajax Libraries to Enhance Your Mashup

Andres Ferrate, July 28th, 2008 Comments(0)

Earlier this year Google released its AJAX Libraries API as a content distribution network and loading architecture for some of the more popular open source JavaScript frameworks (our AJAX Libraries API Profile). According to Google:

The AJAX Libraries API takes the pain out of developing mashups in JavaScript while using a collection of libraries. We take the pain out of hosting the libraries, correctly setting cache headers, staying up to date with the most recent bug fixes, etc.
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 google.load() method.

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.
Yehuda Katz, one of the contributors to the AJAX Libraries API, 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!), 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.

Read on:

Ingen kommentarer:

Send en kommentar