Linked by snydeq on Thu 9th Sep 2010 18:29 UTC
Java Fatal Exception's Neil McAllister sees recent experiments enabling a resurgence for JavaScript on the server, one likely to dent Java's role in the data center. 'Today, projects such as CommonJS and Node.js are extending JavaScript even further, allowing it to take on Java's traditional role in the data center. In a fascinating role reversal, JavaScript is becoming the versatile, powerful, all-purpose language for the Web, while Java risks becoming a kind of modern-day Cobol," McAllister writes. And though such experiments have a ways to go, the benefits of JavaScript as a server-side language are clear and striking.
Thread beginning with comment 440114
To read all comments associated with this story, please click here.
Comment by Kroc
by Kroc on Thu 9th Sep 2010 19:30 UTC
Member since:

Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.

Java’s threat is not JavaScript, it’s Oracle and the big stink they are kicking up. People will avoid the language and new projects will begin to be made in JS and Java will eventually obsolete over the next decade; it will of course matter on where Oracle, and the community, take Java.

The inescapable truth is that client-side, Java is a complete failure. Developers would rather fight with a half-implemented language in half-implemented browsers doing all sorts of insane backflips (like GWT) *just* to save having to serve an <applet> to users.

And running the same code client side as server is a huuuuge boon which is really enticing to users.

Atwood’s Law could not possibly be more poignant. In the race to get everything running in a browser, the server too will pick up the ports too. Expect a flood of JS libraries for everything from encryption to video editing.

Reply Score: 5

RE: Comment by Kroc
by vivainio on Thu 9th Sep 2010 19:40 in reply to "Comment by Kroc"
vivainio Member since:

Expect a flood of JS libraries for everything from encryption to video editing.

Well, there certainly needs to be a flood of libraries because currently JS has almost nothing.

Reply Parent Score: 3

RE: Comment by Kroc
by tessmonsta on Thu 9th Sep 2010 20:00 in reply to "Comment by Kroc"
tessmonsta Member since:

Where exactly did the "Java" come from in JavaScript? Isn't it technically "ECMAScript"? Sure, there are syntactic similarities, but the same could be said for C and PHP...

Not raging on technicalities here, I'm simply curious about the historical context.

Reply Parent Score: 2

RE[2]: Comment by Kroc
by atriq on Thu 9th Sep 2010 20:35 in reply to "RE: Comment by Kroc"
atriq Member since:

It was simply a marketing move between Netscape and Sun.

Reply Parent Score: 2

RE[2]: Comment by Kroc
by Moochman on Thu 9th Sep 2010 20:41 in reply to "RE: Comment by Kroc"
Moochman Member since:

IIRC Sun made a deal with Netscape (the "inventor" of JavaScript back in the day) to cross-license the "Java" trademark, since back then Java was marketed as the new hotness and they wanted some of that to rub off on them. (IIRC this was also part of a larger deal whereby various products were developed and sold jointly by Sun and Netscape under the moniker iPlanet, all of which IIRC is now completely owned by Oracle.) The fact that the syntax has a lot in common is just a bit of trivia that reduces the absurdity factor without actually eliminating it. ;)

Reply Parent Score: 2

RE[2]: Comment by Kroc
by sorpigal on Fri 10th Sep 2010 17:09 in reply to "RE: Comment by Kroc"
sorpigal Member since:

The story is long and boring.

Netscape wanted a scripting language for its browser. At the time netscape also had a good relationship with Sun and Java was the new industry buzzword. (Netscape was working on rewriting Navigator in Java at the time, if I recall correctly.) Originally Javascript was called StarScript, and before that had some codenames that I now forget. Netscape, or perhaps Sun, wanted a scripting language to bridge the gap between embedded Java applets in the browser and the rest of the page. So, the nominal purpose of Javascript was to "script" Java applets. Plus, you got all kinds of automatic buzz! Netscape got a deal from Sun wherein it could use the "Java" in the name, since they were buddies at the time, and so began the most confusing marketing mistake in language history (so much worse than Go).

Microsoft didn't have a deal with Sun for use of the Javascript name, so they called their similar scripting language JScript. I say "similar" out of kindness but in the beginning they were a lot less similar than you'd expect.

Eventually Netscape submitted Javascript to a standards group, in part to counter Microsoft's incompatible implementation which was serving to fracture browser scripting (Microsoft, remember, wanted you to write embedded vbscript!) and the standardized version was released as ECMAScript, a name so uncatchy it was guaranteed to be ignored by everybody.

In practice, today, everyone calls it Javascript but only Mozilla officially is allowed to call its interpreter Javascript. Everyone else makes ECMAScript-compatible interpreters which are called a lot of different things that everybody ignores.

Somebody else can chime in with the actually-correct netscape/sun/java/script stuff, but that's the gist.

Reply Parent Score: 4

RE: Comment by Kroc
by trenchsol on Fri 10th Sep 2010 14:00 in reply to "Comment by Kroc"
trenchsol Member since:

And, why do you think that developers would avoid Java ? Because Oracle prevents Google from developing their own VM ? Because of some open source principles ? Who cares ? JDK is free for download, many additions and development tools, too. Java is stable secure and easy to deploy. There are alternative (compliant) JDK's like IBM JDK, Apache Harmony, Iced Tea.....

There are loads of high quality client side GUI applications written in Swing and SWT.

How many applications have you ever sold to an enterprise customer ? I think it is somewhere around zero, right. Do you imagine that one can come with bunch of open source packages and start to build them with gcc on customers production server ? Forget it, normal people don't even have C/C++ compiler on production machine for security reasons. And what about Windows servers ? Are they supposed to run Visual Studio on production server ?

JS needs standard way of deployment on major HTTP servers, at least one like PHP, which comes packaged and prebuilt for Linux, Mac and Windows, Apache and IIS. Something that IT department of the customers company might install and deploy with confidence, and without possible interference with other applications and services on the production server.

Until those conditions are met, JS is toy for hobbyists. Or, maybe, for sort of things like yet another Wiki engine for nonprofits, who will invite you to the party, instead of paying you money. On such parties, you might meet someone and have sex, that's why such projects are called "sexy projects".

Reply Parent Score: 1