×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Google Releases Open Source JavaScript Tools

timothy posted more than 4 years ago | from the see-not-evil dept.

Google 158

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

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

158 comments

Nice... (2, Insightful)

socceroos (1374367) | more than 4 years ago | (#30001564)

These could come in handy. Google has had a fair bit of experience making Javascript apps that run acceptably. I've got a project coming up, and I'll bookmark this for consideration.

Thanks Google. =)

Re:Nice... (-1, Troll)

Anonymous Coward | more than 4 years ago | (#30001726)

Get some priorities, people! Once again, a muslim goes on a murderous rampage and you want to talk about javascript?

Re:Nice... (0, Offtopic)

Jurily (900488) | more than 4 years ago | (#30001792)

Get some priorities, AC! Google releases the compiler they used to make Gmail fast and you want to talk about muslims?

Re:Nice... (-1, Flamebait)

Anonymous Coward | more than 4 years ago | (#30002132)

Agreed. After all, those soldiers were going to die in the Middle East anyway.

Personally, I'm pissed about the shootings because of the inevitable knee-jerk anti-terrorist laws they're going to pass when it comes to light that the murderer, Major Nidal Hasan, once used bittorrent to download Pearl Jam's "Jeremy". You can bet your ass that we'll be seeing a related YRO story here in 3...2...1....

Re:Nice... (0, Offtopic)

Anonymous Coward | more than 4 years ago | (#30001854)

A type of finely-woven cotton fabric has gone on a murderous rampage you say? That is big news!

Re:Nice... (1, Interesting)

amicusNYCL (1538833) | more than 4 years ago | (#30001740)

These results are very impressive. I fed it a 445KB Javascript file for one of my applications and it was able to reduce that to only 9KB of code! Who knew that 90% of that code was just cruft? It even had the added bonus of randomly inserting subtraction operators in the middle of my identifier names and constants.

closable:f-alse
suc-cess:function(){window.location.reload(true)}

I also gave it the URL of a 860KB JS file which it claimed was "unavailable", despite being able to load the 445KB file in the same directory.

Let me guess, Google: it's a beta.

Re:Nice... (2, Insightful)

tixxit (1107127) | more than 4 years ago | (#30003170)

I am pretty sure that the Closure Compiler is meant to be used with code written for, and in the style of, the Closure Library.

My gawd (0, Troll)

Anonymous Coward | more than 4 years ago | (#30001566)

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?

yeah, do everything from inside a browser because every day 'users' seem unable to deal with anything that doesn't behave like a Web based interface. JavaScript is so inefficient and so many hacks are required to do anything useful we will probably see computers with JavaScript co-processors and Intel Core 3's with extra instructions to help cut through the cruft.

Re:My gawd (5, Insightful)

prozaker (1261190) | more than 4 years ago | (#30001594)

its either javascript, flash or silverlight.

Re:My gawd (1)

prozaker (1261190) | more than 4 years ago | (#30001602)

almost forgot you Javafx :o

Re:My gawd (2, Interesting)

buchner.johannes (1139593) | more than 4 years ago | (#30002360)

It's a sad thing that mono is currently better supported on GNOME than Java. Where are the Java desktop programs?

Anyone unhappy with Flash and Silverlight should really push JavaFX and make his/her desktop Java-ready. Let's kill Silverlight and Flash with Javascript and JavaFX, the open languages.

Re:My gawd (3, Interesting)

Nefarious Wheel (628136) | more than 4 years ago | (#30002618)

Let's kill Silverlight and Flash with Javascript and JavaFX, the open languages.

Sad face here, I wonder just how open Java will remain. Consider: Java was defined by the Sun Java Test Suite, wasn't it? And now Oracle owns Sun. Oracle has long been known to me as a very agressive closed, proprietary company living off their software licenses.

Should the Open Source community still be backing Java, now that the rather benign hand of Sun is no longer controlling it? Is it time to rally around something else now? Some language where you aren't in danger of being sued for infringement if you copy a test suite?

I am worried about Oracle pulling the strings, at some point they may think it in their best interests to act in such a way as to drive the language to more proprietary platforms. It's within their scope to do so, and it may be in their best interests to try. What was once the language choice for clear sailing is now in treacherous waters I think. Write once, run everywhere - for a given value of "everywhere".

Re:My gawd (1)

buchner.johannes (1139593) | more than 4 years ago | (#30002826)

Oracle has various Java-based products, for example the Oracle database installers. Since it is in their best interest that these run everywhere -- Linux-servers, Windows, Solaris, their own Unix -- I highly doubt they will hurt Java deliberately. It is more likely that they aim for interoperability.
Either way, Java is fully open source
=> nothing can control it, it can only have more or less development in some direction
=> nothing *can* kill it, it can only be abandoned.
So I disagree, it is the only language that does "write once, run everywhere" correctly (also considering the defined interfaces for libraries such as audio, bluetooth, databases, ...).

Re:My gawd (0)

Anonymous Coward | more than 4 years ago | (#30003220)

The problem I have with Java is that I can always tell if an app was made in Java because it doesn't look like normal apps on my system. Perhaps it's possible to make it look like a native app, but I have yet to see anyone do it. And no, even telling swing to use native widgets doesn't make it look native.

Re:My gawd (0)

Anonymous Coward | more than 4 years ago | (#30002712)

Can't tell if my sarcasm meter is broken.... but :

I actually like JavaFX. I'm sure people will beat me for it, but I find it really really easy to code with the declarative syntax an' all. Don't get me wrong, it's purely a UI kind of thing, but the syntax is pretty neat, and I can seamlessly integrate a java back end to have a funky UI (try making a shiny iPhone style button with pure Java :) ).

I'm not too sure about it on the browser, I haven't really tried out any heavy duty stuff, but as a desktop application front end it's great.

For me, the kicker is seamless integration between web/desktop apps. Imagine gmail was written in JavaFX, just drag and drop it to your desktop (while it's running in the browser) and bam, desktop email client that you can run without the browser the next time... that's sweet.

It's still only v1.2, and the difference of 1.1 and 1.2 is HUGE. Imagine the improvements still to come.

I know desktop Java is in a sad state now, but they have a really good stack, from the db, enterprise appservers, to client browser UI, to desktop... I really do prefer that to having to mix and match PHP, javascript, Flash and god knows what else to get the same effect.

I know that these things are determined by need, so only time will tell how things will be in a few years.

With GNOME, not too sure what's happening, I haven't had any problems with it so far (although I haven't really given it a hardcore test)

Re:My gawd (1)

maxume (22995) | more than 4 years ago | (#30001604)

And flash pretty much depends on javascript (Well, last time I checked, actionscript was pretty much an implementation of Ecmascript).

Re:My gawd (1)

VGPowerlord (621254) | more than 4 years ago | (#30003060)

its either javascript, flash or silverlight.

I know the GP post isn't the easiest to read, but you replied to a post that boiled down to "why use web technologies when you can write native apps" with "it's either javascript, flash or silverlight" and got modded insightful? WTF?

Anyway, what's wrong with C/C++ and a cross-platform GUI lib, like, say... wxWidgets? Or if you want something at a lower level, SDL?

Re:My gawd (-1, Offtopic)

Anonymous Coward | more than 4 years ago | (#30003138)

I prefer fleshlight personally.

Re:My gawd (-1, Troll)

Anonymous Coward | more than 4 years ago | (#30003280)

do you have a double ended fleshlight? we could fuck it together and cum as we look into each others eyes

Re:My gawd (2, Insightful)

Dhalka226 (559740) | more than 4 years ago | (#30001724)

Personally I find your post to be completely trollish, but let's go ahead and assume everything you've said is correct.

So what?

I don't personally find web-based tools better than ones I install on my own system. Let's go ahead and assume that nobody does and nobody ever will. Why is it wrong or in any way bad that web sites want to push as close as they can to that functionality, either as a replacement for it or simply to enhance their own users' experience? If it becomes the problem you're oh-so-afraid of, it means that people actually like what's going on. I know that's nasty to some geeks who think they know best and anybody who doesn't agree are worthless peasants treading on their turf, but to more reasonable people it's a good thing.

Yes, people will make bad decisions in when, where and how they use JavaScript tools. That's true of any tool. It doesn't devalue it.

Re:My gawd (2, Insightful)

CannonballHead (842625) | more than 4 years ago | (#30001744)

Why are people investing so much in a fundamentally flawed scripting language that has almost no use at all outside the browser

Got any other [well supported] options?

Re:My gawd (4, Insightful)

Post-O-Matron (1273882) | more than 4 years ago | (#30001758)

Let me guess: you're a non-web developer? A.K.A a "real" developer.

Well, in the current web world saying "why use Javascript??" is about a smart question as asking "Why use C??" or "Why use Java??" in the desktop world.

It may have 10,000 flaws in it, but that's the de-facto standard ATM.

Furthermore, unlike the desktop realm were you install your dependencies with an installer, in the web you have to wait 5 years for the crap old technologies to drain out after the new better one comes out.

None of us would use Javascript if we had a choice, but we don't. So toolkits like JQuery or this release by Google are life savers.

Re:My gawd (5, Funny)

RichardJenkins (1362463) | more than 4 years ago | (#30001890)

in the web you have to wait 5 years for the crap old technologies to drain out after the new better one comes out.

Pah! Optimists...

Re:My gawd (5, Insightful)

Mr. DOS (1276020) | more than 4 years ago | (#30002872)

Why is this modded funny? Apparently someone's forgotten that IE6 was released in August 2001; it's taken just over eight years for its market share to be superseded by another browser, and it's still firmly entrenched in some corporate environments.

      --- Mr. DOS

Re:My gawd (1)

Zardoz44 (687730) | more than 4 years ago | (#30002084)

None of us would use JavaScript? Maybe one of us likes it.

Stop confusing the DOM with JavaScript. I think you'd be hard-pressed to find 100 flaws, and less than 10 core language problems (e.g., non-library), with many in both lists being subjective issues.

Re:My gawd (2, Insightful)

Post-O-Matron (1273882) | more than 4 years ago | (#30002250)

I'm not confusing anything with anything. I'd like to have real OO syntax and proper error handling. Debugging JS or maintaining a large JS codebase is a nightmare.

Sure it's awesome for small things here and there, but the problem is exactly the fact that it's usage has grown way beyond that.

Re:My gawd (4, Informative)

markkezner (1209776) | more than 4 years ago | (#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.

Re:My gawd (0)

Anonymous Coward | more than 4 years ago | (#30002240)

but that's the de-facto standard ATM.

JavaScript may be the de-facto standard runtime ATM, since that's what the browser vendors have implemented, but there's other options for the interface the developer deals with. There's a bunch of things that have a different developer interface and yet compile down to JavaScript. Heck, this library includes a compiler that compiles JavaScript down to JavaScript.

For example, Google's other JavaScript library project, GWT, allows you to do almost anything you can do in straight JavaScript using Java instead. You get all the advantages of programming in Java (mostly tooling) and yet your code runs in the browser and, IME, performs better too.

None of us would use Javascript if we had a choice, but we don't.

You do, you either just don't know about your options or you don't like those languages as much as you like JavaScript.

Re:My gawd (0)

Anonymous Coward | more than 4 years ago | (#30002326)

You get all the advantages of programming in Java

What, you get to drive up your LOCs/day "productivity" rating? Only a true masochist could come up with a way to take a fairly terse dynamic language and gunk it up with Java.

ATM? (1)

mevets (322601) | more than 4 years ago | (#30002582)

So javascript is synonymous with ass-to-mouth? I take it you mean the receiving end.

Re:ATM? (1)

Grundlefleck (1110925) | more than 4 years ago | (#30004056)

ATM ATM ATM ATM Silverlight ATM. (Ass-to-mouth's asymmetric technology metaphor applies the meaning against terrible Microsoft Silverlight, at the moment.)

Re:My gawd (1)

jo42 (227475) | more than 4 years ago | (#30002780)

de-facto standard ATM

Some saying about when the only tool you have is a hammer comes to mind here...

Re:My gawd (0)

Anonymous Coward | more than 4 years ago | (#30002860)

None of us would use JavaScript if we had a choice, but we don't. So toolkits like JQuery or this release by Google are life savers.

I would suggest grabbing a copy of JavaScript the good parts. Contrary to popular belief JavaScript is a very good language. It is Lisp in C clothing and was designed that way for a reason. C is the most widely understood syntax while Lisp semantics remain one of the most flexible languages to date. JavaScript is one of the few languages that is truly what you make it. It can be purely functional, It can be OO (Inheritance) or (Mix-In, Interface), you get to decide. You can write deep AI with it, yet a beginner can pick it up as a first language in a few days. And (This is a big one) It has true lambda forms. There are only a hand full of serious flaws to JavaScript the worst being that everything by default is declared in global scope, but even with that the language is so flexible that you can write your own name-spacing scope. JavaScript was chosen (written) as the default language for the web for a reason and it is a shame that the DOM has done so much damage to the reputation of such a well designed language.

Re:My gawd (3, Insightful)

VGPowerlord (621254) | more than 4 years ago | (#30003036)

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

Re:My gawd (4, Informative)

kripkenstein (913150) | more than 4 years ago | (#30003802)

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 (4, Interesting)

kripkenstein (913150) | more than 4 years ago | (#30003792)

None of us would use Javascript if we had a choice, but we don't. So toolkits like JQuery or this release by Google are life savers.

JavaScript the language is actually very nice - the main problems with 'JavaScript' are browser inconsistencies, the DOM, etc. etc.

But if you take JavaScript itself, then yeah it has some problems - it was rushed - but it has good parts [blogspot.com] : It's a dynamic language, supports closures, first-class functions, convenient object definition syntax (from where we get JSON), etc. Due to its ubiquity, it also has the most secure and fast engines of any dynamic language (except for LuaJIT, but a comparison there is a topic all in itself).

Because of those, JavaScript is being used more and more as a scripting language outside of web browsers, for example in desktop environments, game engines, etc. If you stick to good coding practices in JavaScript, you can write large and robust applications in it.

But, again, to return to the original point, the current state of JavaScript in browsers is very messy. Which is why we need things like jQuery, and maybe this new library from Google as well.

Re:My gawd (4, Informative)

asdf7890 (1518587) | more than 4 years ago | (#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).

Re:My gawd (1)

Azureflare (645778) | more than 4 years ago | (#30001874)

The main problem I've found is how web servers/web browsers tend to rewrite the html used in the page. Sometimes. So sometimes there will be no quotes around attributes for elements in IE6, but there will be double quotes around attributes for elements in Firefox. It drives me crazy when using specific html commands from jquery especially.

But largely I've found jquery to be a lifesaver as another person said above. There are quirks, but they are fairly minor and only if you are doing really complicated stuff you probably shouldn't be doing on the client side anyway (but sometimes you have to when you are forced to use a COTS product hosted on their servers .. sigh).

Re:My gawd (1)

ceoyoyo (59147) | more than 4 years ago | (#30003068)

Yes, it's not Javascript that's the problem, it's the web browser. We should just take the javascript interpreter out of the browsers and use it alone to interpret Javascript programs. Let the program talk directly to the web server, database, whatever. You could even use ports other than 80! ;)

You can build applications using javascript (2, Interesting)

pizzach (1011925) | more than 4 years ago | (#30001780)

It's not that rare. Many cellphones are going this route nowadays as well as the Mac OS X dashboard widgets and Mac OS X apps [macosx.com] . Then of course, there are the gtk javascript bindings [arstechnica.com] .

Javascript is finding itself in more and more places nowadays.

Closure/Clojure/closures (4, Insightful)

John Whitley (6067) | more than 4 years ago | (#30001584)

Good grief. Homophone insanity. We've got Clojure [clojure.org] doing interesting things in the language and concurrency space. Block support in C/Objective-C [thirdcog.eu] reinjecting "closures" into everyone's vocabulary. And now Google jumps in with "Closure" just to make sure that no one has any idea what anyone else is talking about...

Re:Closure/Clojure/closures (5, Funny)

Anonymous Coward | more than 4 years ago | (#30002126)

Sounds like a real clojure-fuck.

Re:Closure/Clojure/closures (0)

Anonymous Coward | more than 4 years ago | (#30002192)

I seriously have no idea what you're talking about.

Re:Closure/Clojure/closures (1, Informative)

Anonymous Coward | more than 4 years ago | (#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:Closure/Clojure/closures (1)

zapakh (1256518) | more than 4 years ago | (#30003306)

A homophone is a word that sounds the same as another but has a different meaning.

Oh, "homophone". I was thinking of a word that sounds almost the same but has a very different meaning.

Re:Closure/Clojure/closures (1)

Requiem18th (742389) | more than 4 years ago | (#30002334)

They are continuing with the work they started with the "Chrome" browser, making sure nobody find out that Mozilla invented "chrome://" or what it can do with that.

Re:Closure/Clojure/closures (1)

pohl (872) | more than 4 years ago | (#30003124)

Look up "chrome" in the jargon file. Read the definition. Think about it.

Re:Closure/Clojure/closures (1)

Requiem18th (742389) | more than 4 years ago | (#30003724)

I don't see a problem, Mozilla is a web browser, the "chrome" in the Jargon file is an outdated slang term, Chrome is *also* a web browser, it's a context problem.

If you tell people, that Firefox bug allows running code with chrome privileges they'll wonder if they have to uninstall Chrome. Before, searching for "Firefox chrome" gave you documentation, now it gives you browser benchmarks and reviews.

What bugs me is that they are partners with Mozilla, they know Firefox, intimately, and they STILL named their browser Chrome, not just despite the conflict, but I suspect because of the conflict.

It as if Mozilla renamed bespin to wave, wanna have real time collaboration on wave? wait Mozilla's or Google's? Except of course Mozilla can't throw its weight around like that like a heavy monopolist like Google can.

Closure/Clojure/closures/Clozure (1)

uid8472 (146099) | more than 4 years ago | (#30002412)

Good grief. Homophone insanity. We've got Clojure [...] "closures" [...] And now Google jumps in with "Closure"

It's worse than that; there's also Clozure Common Lisp [clozure.com] .

Re:Closure/Clojure/closures (0)

Anonymous Coward | more than 4 years ago | (#30002948)

I think it goes to show a certain arrogance at google. First google steals "chrome" from mozilla, now they have "closure". Eventually they'll start a beer recommendation service and call it "Duff's Device". They think their stuff is so great that they can use any name they want to, even if it's already used and well established by something else.

These are smart people. Either they are the world's most uncreative smart people or they co-opt other people's terms on purpose. With 'chrome' especially they were obviously just being dicks.

And don't get me started on Apple... adding Blocks to a language that already has blocks. The only explanation is so that people have to say "Apple Blocks" to distinguish it. Give me a break.

Unimpressive (4, Interesting)

BitHive (578094) | more than 4 years ago | (#30001596)

Half the demos don't work and these widgets are hideous even by Google standards. I'm gonna stick with ExtJs for the forseeable future.

Re:Unimpressive (2, Interesting)

lhoguin (1422973) | more than 4 years ago | (#30001806)

Looking at the library's source code, I don't find many new things that I can't already find in another library. I'm sure there's interesting components, but this looks more like another case of NIH than anything. If their code really is faster I'd rather have them work on existing libraries and try to speed things up for everyone rather than creating more of the same thing.

Of course, if everyone uses Google's tools and libraries, it makes things easier for them to optimize Chrome, which is probably the whole point.

Embracing and extending (3, Insightful)

gmuslera (3436) | more than 4 years ago | (#30001638)

I know that it probably work in current major browsers without problems, but somewhat look a bit like a push towards Chrome. If things start to base more and more in javascript, specially complex one, not only the old browsers will die (ok, killing IE6 for good is an obligation for the future of mankind, or at least internet), but also current/competitive browsers not so fast at the javascript arena will get a big hit too. Good enough will stop being enough when most internet need complex javascript and a blazing fast javascript engine to work. But i suppose that is better that it be based on open standards from the start than the adoble flash way.

I suppose that complaining about this sounds like asking to forget civilization and go back to rural communities and simpler old way of life, but sometimes you miss the good old web as it used to be (yes, even the slashdot comment editor from 1997)

Re:Embracing and extending (2, Informative)

maxume (22995) | more than 4 years ago | (#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:Embracing and extending (0)

Anonymous Coward | more than 4 years ago | (#30002102)

Care to tell us Anonymous Cowards how? Do we have to register or some stupid shit like that to disable the fucking moronic use of JavaScript and AJAX here at Slashdot?

Re:Embracing and extending (0)

Anonymous Coward | more than 4 years ago | (#30002854)

No idea, but you can register and still post as anonymous coward you know ;)

Re:Embracing and extending (4, Interesting)

Rylz (868268) | more than 4 years ago | (#30001764)

look a bit like a push towards Chrome.

Funny, I've also heard this argument the other way around. A lot of people seem to think that Chrome is actually meant simply to push every browser developer to build faster JavaScript support and to catalyze other technologies that will allow Google to develop better web applications. Maybe this release is also a push towards those goals.

Re:Embracing and extending (1, Insightful)

Anonymous Coward | more than 4 years ago | (#30001784)

rural communities are indeed better, more space, less snitching, you get to know people rather than just assuming everyone is a paedophile

JavaScript is what is driving the hardware upgrade cycle these days. I can use email/IM/word processors, even minimalist image editors and possibly VoiP on a pentium 90 reasonably well but it won't run the newest browsers or load even a 'minimalist' modern site. I think client-side scripting in browsers should be done away with completely, come up with a protocol-level replacement for AJAX and maybe add a few features to CSS and nothing of value will be lost.

Re:Embracing and extending (1)

fuzzyfuzzyfungus (1223518) | more than 4 years ago | (#30002428)

If you want a server to draw the page for you, you might as well just run an ordinary modern browser on that server and connect via x11/citrix/whatever.

You'll get about the same effect, and won't have to wait for everyone to adopt your plan.

Re:Embracing and extending (2, Interesting)

amicusNYCL (1538833) | more than 4 years ago | (#30001844)

If things start to base more and more in javascript, specially complex one, not only the old browsers will die (ok, killing IE6 for good is an obligation for the future of mankind, or at least internet), but also current/competitive browsers not so fast at the javascript arena will get a big hit too. Good enough will stop being enough when most internet need complex javascript and a blazing fast javascript engine to work.

It's not really that bad. I've been developing a pretty massive application based on ExtJS that runs surprisingly fast in IE6. In Chrome or Firefox it runs very fast. I'm talking about 450KB minified Javascript files here, doing things like laying out data in sortable filtering grids, tree structures, drag and drop, etc. I'm surprised at how well IE manages to use it.

Re:Embracing and extending (4, Insightful)

nurb432 (527695) | more than 4 years ago | (#30001858)

It also kills off older hardware that was perfectly fine for rendering server side processing, but will choke with this move back to client side ( which personally, i think is the wrong direction, but that is a different discussion )

Re:Embracing and extending (1)

khallow (566160) | more than 4 years ago | (#30002704)

It also kills off older hardware that was perfectly fine for rendering server side processing, but will choke with this move back to client side ( which personally, i think is the wrong direction, but that is a different discussion )

Depends on the client side load. Shifting some load to a zillion clients makes a lot of sense from a serverside point of vieww.

Re:Embracing and extending (0)

Anonymous Coward | more than 4 years ago | (#30001946)

Speaking of Slashdot, DAMN do they need to use this on here!

As well as fix the numerous bugs that appear on each of the sub-domains, all seem to have their own unique quirks like some circle icons that nobody knows what the hell they are and where they came from, or the threshold bar glitching out, page failing to load some of the columns and the threshold bar ends up appearing over the article...

Re:Embracing and extending (0)

Anonymous Coward | more than 4 years ago | (#30001998)

Google's v8 is open sourced, so there's no reason for a browser not to have a decent (at least as decent's as google's) javascript engine now.

Source code link (0)

Anonymous Coward | more than 4 years ago | (#30001690)

Neither the summary nor TFA link to the actual code: http://code.google.com/p/closure/

NX (0)

Anonymous Coward | more than 4 years ago | (#30001720)

what does this have to do with the NX server? or is it just the notion of being opensource as well?

jtemplates vs. closure templates? (1)

Azureflare (645778) | more than 4 years ago | (#30001752)

I currently use jquery and jtemplates with json data. How do the closure template commands compare to jtemplates? I didn't really see any ajax functionality in the tutorials but I haven't had time to delve any deeper. Has anyone spent more time with this?

I'm still going to read through it, was just wondering if anyone else has more experience with closure.

Re:jtemplates vs. closure templates? (2, Informative)

Azureflare (645778) | more than 4 years ago | (#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 :)

Re:jtemplates vs. closure templates? (2, Informative)

Azureflare (645778) | more than 4 years ago | (#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.

Re:jtemplates vs. closure templates? (1)

Clover_Kicker (20761) | more than 4 years ago | (#30002450)

edit feature? So we can go back to all our highly modded posts and replace them with ASCII goatse pics?

"The" NX server? I don't think so. (4, Insightful)

Lemming Mark (849014) | more than 4 years ago | (#30001812)

"The announcement comes a few months after Google released and open sourced the NX server."

That's a bit confused... it may just be a typo but it's resulted in a misleading statement. Google released *their* NX server as open source. Previously the FreeNX project had independently created an open source NX server, using libraries provided by NoMachine (inventor of the NX protocol) who provide all of the clever compression stuff from their server as open source libraries.

The summary makes it sound like Google were solely responsible for the existence of an open source NX server, whereas actually I'd say they're "standing on the shoulders of giants (NoMachine), next to some other dude who was already up there (FreeNX)"

Apache v2.0 (5, Informative)

RiotingPacifist (1228016) | more than 4 years ago | (#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:Apache v2.0 (0)

Anonymous Coward | more than 4 years ago | (#30002142)

Amen! Fuck the /. editors.

Re:Apache v2.0 (1)

Azureflare (645778) | more than 4 years ago | (#30002172)

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

Can you rephrase that in english please? Does that mean we can't use this in commercial products?

I'm curious why Google didn't choose the the dual MIT/GPL license like jquery uses.

Re:Apache v2.0 (0)

Anonymous Coward | more than 4 years ago | (#30002386)

It's Apache v2.0. It doesn't get much more open than that.

Re:Apache v2.0 (1)

markkezner (1209776) | more than 4 years ago | (#30002736)

You absolutely can use that in commercial products. You can also create derivative works and not release the source.

Apache 2.0 is considered a "commerce friendly" open source license (whatever that means). You'll see it in commercial products like Android and the Apache web server.

Wikipedia entry [wikipedia.org]
Apache 2.0 License full text [apache.org]

multi-threading (0)

Anonymous Coward | more than 4 years ago | (#30001832)

Unless this library, or Javascript in general has a usable threading model, it will remain a toy.

Lego-like (5, Informative)

Art3x (973401) | more than 4 years ago | (#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.

Re:Lego-like (1)

TeamSPAM (166583) | more than 4 years ago | (#30002472)

2a Trying to get your Javascript to work in Facebook's sandboxed version (FBJS) only make the nightmare worse.

What we really want (1)

Tablizer (95088) | more than 4 years ago | (#30002232)

What would really be nice is an HTML/XML-like language that has features for building real desktop-like GUI's 95% declaratively in a state-ful way instead of JavaScript IF's, loops, and pathy set/gets.

Re:What we really want (1)

Planesdragon (210349) | more than 4 years ago | (#30002702)

What would really be nice is an HTML/XML-like language that has features for building real desktop-like GUI's 95% declaratively in a state-ful way instead of JavaScript IF's, loops, and pathy set/gets.

1: GTK javaascript. or JavaScript .net. language + framework = program.
2: MS has crap like that. And so does Firefox. You just don't pay attention to it.
3: statefulness in JavaScript is simple. Passing references vs. Passing Values.... is not.

Re:What we really want (1)

Tablizer (95088) | more than 4 years ago | (#30002954)

I meant OSS. And it would be mostly a markup language, not FooScript of some sort.

Re:What we really want (1)

shutdown -p now (807394) | more than 4 years ago | (#30003254)

It's called WPF. And you can use IronPython/IronRuby for the code parts (those that cannot be shoved into the declarative model in any way).

How does this integrate with GWT (2, Interesting)

Chrisq (894406) | more than 4 years ago | (#30003766)

GWT is a great Java to Javascript environment, but falls down in that to produce new components (ouside the toolbox provided) is difficult and requires raw javascript. Does anyone know if these products integrate or work together, because what would be really nice would be to be able to use closure to produce GWT components
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...