A First Shot At Using Google Closure Tools

26 November, 2009 § 1 Comment

Just recently, Google made public their Google Closure Tools. The Google Closure Tools are a set of three tools that can be used to write fast loading and executing JavaScript, animated UI elements, templated DOM structures, and more. The three tools are: Closure Library, Closure Templates, and Closure Compiler.

I recently wrote a Pearson Correlation calculator in Python and decided to port it to JavaScript for use on a webpage. I thought this would be a good opportunity to try out some of the Closure Tools.

I used the Closure Library and the Closure Compiler for this little exercise.

After the development was completed, I used the Google Closure Compiler to reduce the size of the JavaScript. The pre-compiled JavaScript size was 634kb. The compiled JavaScript size is a mere 33.96kb.

I am very impressed with the tools. First, the documentation is superb, and I am amazed at the number of demos that are available for most of the UI components. Second, there is finally a way to evaluate JavaScript in a ‘compile-time’ fashion.

These two alone make these tools worth checking out. I hope to gain more experience with the Library soon, and should have more to post about it.

Tagged: , ,

§ One Response to A First Shot At Using Google Closure Tools

  • A.J. says:

    Yeah Jared,

    I just checked out your Pearson Correlation Calculator and it is pretty snazzy! You’re getting quite versed in many languages. The compiled JavaScript is considerably much smaller!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

What’s this?

You are currently reading A First Shot At Using Google Closure Tools at JAWS.


%d bloggers like this: