Asif Maniar

Software Engineer
posts - 16, comments - 10, trackbacks - 0

My Links

News

Article Categories

Archives

Post Categories

Image Galleries

IIS

First thoughts on Google Closure

Google has open sourced their internal JavaScript library under the name Closure.

You can download the library using any svn client by pointing to http://closure-library.googlecode.com/svn/trunk/ and getting everything locally into a closure-library-read-only folder.

All your custom html/js can then reside next to this folder.
To use the framework you have to load the base.js into your document.
<script src="closure-library-read-only/closure/goog/base.js">
 
Additionally you can import specific class by registering the namespace in your javascript code file like this:(yes its very object oriented!)
goog.require('goog.dom');
goog.require('goog.ui.Zippy');
 
My folder structure looks like this: (with the hello and notepad test projects)



To further browse the samples open your \closure-library-read-only\closure\goog\demos\index.html file.
It demos the power of the framework with some really cool samples.

So far I love what am seeing. Hope to build something cool real soon!
 
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Friday, November 13, 2009 4:45 PM | Filed Under [ JavaScript ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: