Slashdot Mirror


Google Releases Open Source JavaScript Tools

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."

14 of 158 comments (clear)

  1. Re:Embracing and extending by maxume · · Score: 2, Informative

    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).

    --
    Nerd rage is the funniest rage.
  2. Re:My gawd by asdf7890 · · Score: 4, Informative

    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" 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).

  3. Apache v2.0 by RiotingPacifist · · Score: 5, Informative

    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

    --
    IranAir Flight 655 never forget!
  4. Re:Unimpressive by amicusNYCL · · Score: 3, Informative
    --
    "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
  5. Re:jtemplates vs. closure templates? by Azureflare · · Score: 2, Informative

    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 :)

  6. Re:jtemplates vs. closure templates? by Azureflare · · Score: 2, Informative

    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.

  7. Lego-like by Art3x · · Score: 5, Informative

    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.

    1. Re:Lego-like by lhoguin · · Score: 2, Informative

      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 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?

  8. Re:Closure/Clojure/closures by Anonymous Coward · · Score: 1, Informative

    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.

  9. Re:My gawd by markkezner · · Score: 4, Informative

    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) to this approach. Just because it may not be what you're used to or comfortable with doesn't make it bad.

    --
    Dangerous, sexy, turing complete: Femme Bots
  10. It's also faster than Python by melted · · Score: 2, Informative
  11. Re:My gawd by kripkenstein · · Score: 4, Informative

    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. 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.

  12. Re:My gawd by Anonymous Coward · · Score: 1, Informative
  13. JavaScript isn't more flawed than other languages. by tjstork · · Score: 1, Informative

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

    --
    This is my sig.