Load your JavaScript Frameworks From Google
Bookmark :
I don't know about anybody else but when I'm writing a new Domino application that will have a nice web based UI I will probably add the javascript library and resources that I decide on using into the NSF so that the application will be portable between servers.
If I was working in a fixed environment I could just place the required files directly on the server and I'd know they were there but for something like BlogSphere that anybody can download that's just impossible to do.
But now there is a new option thanks to Google. They have started hosting a selection of different JavaScript libraries on their servers that anybody can freely reference from within their own applications. They are hosting different versions of the scripts and have vowed to never remove a hosted script from their servers so that it is always available.
One nice thing about hosted script libraries this is that if multiple applications, even if on different servers, are using the libraries then they will be cached in the end users browser, making them load faster for the end user and, of course, taking the traffic hit away from your server.
And it couldn't be easier to use. Lets say I want to use MooTools V1.1.1 then all I do is add
<script src="http://www.google.com/jsapi" />
<script>
google.load("mootools", "1.1.1");
</script>
If I always want the latest version of the library I can just leave out the version number and the loader will know which one to provide and if I always want the latest in the version 1 codestream I just put a '1' in the version field and it will load in the latest V1.x release.
For more information check out the Google AJAX Libraries API site.





Comments
thanks
Posted by Robert At 04:48:33 PM On 05/28/2008 | - Website - |
Jim
Posted by Jim Roysdon At 01:24:59 PM On 06/02/2008 | - Website - |
Posted by osman jalloh At 02:36:28 PM On 06/11/2008 | - Website - |