5 ms·
Ask HN: Is JavaScript Java.next()?
Like you all I digest the daily collection of JavaScript-created genius on HN with a little bit of "god I hope I don't need to learn how to do that..." and a whole lot of open-mouthed gawking.
Some JavaScript trends in the last few weeks that I didn't know was possible:
PDF Rendering [1]
MP3 Decoding / Playback [9]
Parsing/Rendering RAGE Game Levels [2][3]
Parsing EXIF Data from JPG/TIFF Images [4]
Physics Simulations [11]
Animated/Interactive Insanity (Thanks Ben Vanik!) [5]
Servers! (Nodejs) [6]
Video Games [7]
Why isn't any of this being done at the same scale and fervor with Flash? Why not Java Applets? JavaFX? Air? Silverlight?
JavaScript seems to have something going for it that only Java before it had: a VM arms race involving all the major tech companies in the industry.
The first 4-7 years of Java's life was punctuated by almost yearly (notable) performance jumps as Sun, IBM and BEA battled each other for the VM crown (Microsoft bowed out early after the lawsuit so I won't include them). I remember the pre-1.4 days as relatively blasphemous to use Java on the server side; it was too "slow and bloated" for a large-data application (although IIRC eBay was one of the first large-scale commercial rollouts of Java).
Post-1.4, into the 1.5/5.0 and 6.0 days it became a forgone conclusion for a lot of folks that Java was just what you used on the server[8].
That shift and acceptance caught me off guard at the time, but I see that as a direct function of the performance increase in Java (and server hardware) suddenly allowing the convenience of using Java to be a reality with less and less cost associated with it.
That seems to be exactly what is going on now with Google, Apple, Mozilla and Microsoft. I imagine some of these companies (Microsoft?) would have preferred staying out of the VM wars, but find themselves committed[10] because of how fast the tech is advancing.
Look at what JavaScript was doing 4 years ago compared to those links I posted above and it's night-and-day; more of a leap than Java ever took and I don't see the trend slowing.
I've been curious for 4 years or so what Java.next() would be.
Ruby has got it's following and GO will most certainly have it's group of supporters grow in the next few years as the language matures, but none of these languages had what it took to actually knock Java off its "I do everything pretty well on most all platforms!" pedestal until JavaScript sauntered in the room and every hacker with a wild hair decided to do things I thought were impossible with it.
To recap, why I see JavaScript as Java.next():
- Platform independence (Desktop, Server, Mobile, etc.)
- VM Arms Race / Investment from 4 mega corps
- Java-esque feel to it, making it an easier transition
- Big existing code base of libraries and examples
Do you all see the same writing-on-the-wall that I do or have I just convinced myself it is there?
[1] http://blog.mozilla.com/cjones/2011/07/03/pdf-js-first-milestone/
[2] http://blog.tojicode.com/2011/05/webgl-rage-source-is-up.html
[3] http://www.youtube.com/watch?v=d0S2dsuSxHw
[4] http://blog.nihilogic.dk/2008/05/reading-exif-data-with-javascript.html
[5] http://www.ro.me/
[6] http://nodejs.org/
[7] http://www.webresourcesdepot.com/25-amazing-javascript-games-some-fun-and-inspiration/
[8] http://www.infoq.com/articles/twitter-java-use
[9] http://jsmad.org/
[10] http://mashable.com/2010/10/29/microsoft-silverlgiht-html/
[11] http://www.queness.com/post/3296/8-amazing-javascript-experiments-of-physic-and-gravity-simulation
- Apocryphon 15y agoWhat's the JS equivalent to J2EE?
- CyberFonic 15y agoWhy would you want one? For me J2EE is the very reason I abandoned Java. Lean and mean is the win for me. Unfortunately, I can see that given time NodeJS will accumulate all the "enterprise features" to make it the behemoth of its day.
- threepointone 15y agoI've actually heard Ryan Dahl (who made node.js) say specifically that he's against node becoming Java-like. I'd take his word for it :)
- Meai 15y agoIf we get an IDE with proper intellisense going and performance comparable to Java and C were indeed possible. Personally, I just don't think a dynamic language is ever going to get large scale adoption like Java/C/C++. It's just too inconvenient to test. I actually think C is going to have a comeback, as crazy as that sounds right now.
- nxn 15y agoBecause using javascript is convenient and fits well in an environment of "just type in a URL and you're good to go"; your users wont have to install anything, you'll be able to make updates EVERYONE will get the next type they visit, and you're not limiting yourself to a fraction of the people who have an up to date version of some plugin. To me that's seriously about the most perfect app deployment mechanism I could want. At least on the web it is. I personally still wouldn't use node.js ever, but I see how it might be used by someone who already knows javascript and doesn't have the time to pick up Haskell or Erlang for some idea they want to execute. Also, it used to be that without the HTML5 tech a lot of what you listed wasn't even possible and that was a forcing factor to use something else. So it's not just improvements in speed here, that RAGE demo wouldn't exist without WebGL.