Forgot your password?
typodupeerror
Google Software Technology

Google Releases Open Source JavaScript Tools 158

Posted by timothy
from the see-not-evil dept.
Dan Jones writes "Google has open sourced several of its key JavaScript application development tools, hoping that they will prove useful for external programmers to build faster Web applications. According to Google, by enabling and allowing developers to use the same tools that Google uses, they can not only build rich applications but also make the Web really fast. The Closure JavaScript compiler and library are used as the standard Javascript library for pretty much any large, public Web application that Google is serving today, including some of its most popular Web applications, including Gmail, Google Docs and Google Maps. Google has also released Closure Templates which are designed to automate the dynamic creation of HTML. The announcement comes a few months after Google released and open sourced the NX server."
This discussion has been archived. No new comments can be posted.

Google Releases Open Source JavaScript Tools

Comments Filter:
  • by maxume (22995) on Thursday November 05, 2009 @07:52PM (#30001660)

    You can turn on the old comment system (well, the pre-javascript one, I don't remember if it is the same as what there was in 1997).

  • Re:My gawd (Score:5, Informative)

    by asdf7890 (1518587) on Thursday November 05, 2009 @08:09PM (#30001768)

    Why are people investing so much in a fundamentally flawed scripting language that has almost no use at all outside the browser and that Palm Pre thing that is basically a browser in a plastic case?

    Actually JavaScript is a rather good language in many ways, though it does have some flaws. Give "JavaScript, the Good Parts [oreilly.com]" a quick read some time.

    The main problem in the place where people usually see the language, in the browser, is when interacting with the Document Object Model in browsers - a model that isn't exactly my favourite environment to start with and that is before considering all the hacking you have to do to get things to work well on multiple browsers (even when only considering modern versions).

  • Apache v2.0 (Score:5, Informative)

    by RiotingPacifist (1228016) on Thursday November 05, 2009 @08:16PM (#30001824)

    It seams silly to mention that it's open source without giving the license. Btw It's not copyleft, allows linking from other licenses and is GPLv3 compatible

  • Re:Unimpressive (Score:4, Informative)

    by amicusNYCL (1538833) on Thursday November 05, 2009 @08:16PM (#30001828)
  • by Azureflare (645778) on Thursday November 05, 2009 @09:11PM (#30002144)
    Okay wow, spent some time looking over the API reference.. This thing seems awesome! I love the UI components they've opened up. Those could be pretty useful. Too bad it might mean having to rewrite all my jquery code to closure, but maybe that's not such a bad thing. There's a lot of things in there that would be very nice to use. I'm probably going to try creating some simple projects before adopting it though.

    You know what'd be great? If there were more tutorials that show off a lot of the functionality you can achieve with closure. Hello world and notepad editors just don't cut it as demos. (Hint hint google :)
  • by Azureflare (645778) on Thursday November 05, 2009 @09:12PM (#30002150)
    Addendum: I realize their various apps use this as their language but when I say "demo" I mean demo with source code (e.g. tutorial :)

    P.S. WTB edit feature on slashdot.
  • Lego-like (Score:5, Informative)

    by Art3x (973401) on Thursday November 05, 2009 @09:20PM (#30002194)

    The Closure Library has a lot of useful-looking classes and functions, like for working with Arrays, Dates, or the URL. They're divided into short files, so that you can use just the parts you want and not have to download one big file.

    jQuery has definitely been a great library, especially at finding things in the DOM. And I think its API for handling events is easier (definitely less to type) than this. But it doesn't have all of the things that this has --- short helpers that probably I would end up writing on my own (and already have started to).

    I'm also interested in the UI Widgets like an Autocomplete text field. I've been waiting for the jQuery UI team to finish that one widget for months, but for some reason their development is so slow!

    Standard Disclaimer about JavaScript:

    1. 1. JavaScript is a nice language.
    2. 2. Writing JavaScript to work in Internet Explorer, Firefox, Safari, and Opera is a nightmare like no other.
    3. 3. Mainly it boils down to writing JavaScript to work in (A) Internet Explorer and in (B) browsers that are not Internet Explorer.
    4. 4. The "core" JavaScript is really nice: dynamic typing, super-short syntax for hash tables, arrays, regular expressions; dot-chaining of members and methods.
    5. 5. The browser API, or "DOM", part of JavaScript is different in IE than in the rest, and this, I think, is the main reason it's a pain. But jQuery and other libraries smooth this over.

    Like has been said, watch the Google Video "JavaScript: the Good Parts" to elaborate on this. And if you hate JavaScript but are forced to write it and haven't read JavaScript: The Definitive Guide, it's the best book on JavaScript and one of the best O'Reilly books period.

  • by Anonymous Coward on Thursday November 05, 2009 @09:34PM (#30002278)

    A homophone is a word that sounds the same as another but has a different meaning. I just wanted to make sure you got a post from someone who thought you were serious.

  • Re:My gawd (Score:5, Informative)

    by markkezner (1209776) on Thursday November 05, 2009 @10:53PM (#30002696)

    I'd like to have real OO syntax

    What is it about JS's OO syntax that isn't "real"?

    Is it because it's prototype-based instead of the class-based paradigm that you're probably used to? There are actually some advantages (and disadvantages) [gatech.edu] to this approach. Just because it may not be what you're used to or comfortable with doesn't make it bad.

  • by melted (227442) on Friday November 06, 2009 @01:05AM (#30003112) Homepage

    And Ruby, PHP and Perl. Check it out for yourselves: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=v8&lang2=python&box=1 [debian.org]

  • Re:My gawd (Score:5, Informative)

    by kripkenstein (913150) on Friday November 06, 2009 @04:40AM (#30003802) Homepage

    To extend the analogy someone else used earlier, OO in Javascript is like attempting to tighten a screw with a hammer.

    I respectfully disagree.

    See for example John Resig's approach [ejohn.org]. Basically it adds more familiar class-based inheritance to JavaScript, building upon the existing prototype-based inheritance. I am using it in a large project (see my homepage link), and it works great. Btw, it seems Google has something similar in the Closure Library, as well, but I didn't check if it was as concise as Resig's.

    JavaScript is a flexible language (Crockford once called it "Lisp in C's clothing"), which lets you 'extend' it in ways like the one linked to above.

  • Re:My gawd (Score:1, Informative)

    by Anonymous Coward on Friday November 06, 2009 @07:37AM (#30004414)
  • Re:Lego-like (Score:2, Informative)

    by lhoguin (1422973) on Friday November 06, 2009 @07:49AM (#30004458) Homepage

    I'm also interested in the UI Widgets like an Autocomplete text field. I've been waiting for the jQuery UI team to finish that one widget for months, but for some reason their development is so slow!

    I've been using the original autocomplete plugin [bassistance.de] for a long time now, it works great. This is the plugin that is used as a basis for the UI autocomplete component. Anything preventing you from using it in the meanwhile?

  • If you think Javascript isn't very powerful and cannot see its advantages, particularly with dynamic types, then you obviously haven't used it.

(1) Never draw what you can copy. (2) Never copy what you can trace. (3) Never trace what you can cut out and paste down.

Working...