Google offers JavaScript programming tools

By Stephen Shankland, CNET News.com
Friday, November 06, 2009 01:59 PM

With a project called Closure Tools, Google plans on Thursday to start helping developers who aspire to match the company's proficiency in creating Web sites and Web applications.

Google is a strong proponent of using JavaScript to write Web-based programs, part of its Web-centric ethos. Indeed, the company has pushed the language to its limits with services such as Gmail and Google Docs, and it developed its Chrome browser in part to enable JavaScript programs to run faster.

But writing, debugging, and optimizing heavy-duty JavaScript can be difficult--in part because a given JavaScript program sometimes works differently on different browsers. Google's open-source Closure Tools project is an attempt to help with some of these challenges.

The first in the suite of tools is the Closure Compiler, a software package designed to boil down a JavaScript program so it's smaller and runs faster. For example, a function named DisplayAddress() could be replaced with just a().

Along with the compiler come some extra tools that run in the Firefox browser. One, Closure Inspector, is an extension for Firefox's Firebug add-on designed to help programmers understand and debug the rewritten JavaScript--linking a() back to DisplayAddress(), for example. Another add-on for the Google Page Speed extension lets programmers see how much the compiler helped.

Google also plans to make the compiler available as a Web application hosted on its Google App Engine service.

The second element is called the Closure Library, a collection of prebuilt JavaScript code that lets programmers handle relatively sophisticated technology--arrays and string manipulation, for example.

Last are Closure Templates, more prewritten code to ease creation of JavaScript and HTML user interfaces.

In an earlier era, programming tools were expensive packages bought by a select few, but open-source software, new marketing strategies, and new business methods have made that approach the exception rather than the rule these days. Now programming tools are often a means to another end--encouraging programmers to produce the software that will make Windows or the Palm Pre useful and therefore popular, for example.

In Google's case, the objective is often to make the Web more popular because it sees more activity on the Web as corresponding directly with more activity on its revenue-generating search site. Among the high-profile projects to this end are Chrome, Chrome OS, and Android, all subsidized by Google's powerful search-advertising business.

One interesting contrast to Closure is another Google project called Google Web Toolkit. It's designed to accomplish some of the same goals as Closure, including paving over browser incompatibilities and producing high-performance JavaScript. But with GWT, coders write programs in Java that gets translated into JavaScript.

So one last question: why the name?

Google's reply: "Being a functional language, the concept of a function closure is fundamental to the JavaScript language."

This article was first published as a blog post on CNET News.


WORTHWHILE?

0

0 votes
Blog

Talkback 0 comments

There are currently no comments for this post.


Tech Jobs Now!

Search for your ideal tech job:

Reviewing scheduled task inventory for Windows Server 2008 R2

Windows Server

Default installations of Windows Server 2008 R2 enumerate a number of default scheduled tasks, many of which you may not need.


Read more »



Don't CC me, I'll CC you

Blog thumbnail

Carbon paper fascinated me when I was younger. Write once, get two copies. What a great invention and work tool, I thought.

Then came e-mail, and making carbon copies of important..... by Eileen Yu

Read more »

Tags

  1. advertisement
  2. blog
  3. facebook
  4. google inc.
  5. internet
  6. internet advertising
  7. microsoft corp.
  8. network
  9. revenue
  10. search
  11. social networking
  12. software
  13. u.s.
  14. video
  15. web
  16. web 2.0
  17. web browser
  18. web services
  19. web sites
  20. yahoo! inc.