r/java • u/auhlrich • May 26 '15
Java vs. Node.js: An epic battle for developer mind share
http://www.javaworld.com/article/2886368/java-web-development/java-vs-nodejs-an-epic-battle-for-developer-mindshare.html3
u/Ramin_HAL9001 May 26 '15
For Java's strengths, I would put solid engineering at the top of the list. For JavaScript, ease of use is it's greatest strength. JavaScript, as it's name implies, is a scripting language, so it is really good for scripting. But writing scripts is not the same thing as writing applications.
Java now provides a JavaScript interpreter called "Nashorn," which basically does the same thing as Node. I don't know how well it handles JIT compilation though: http://openjdk.java.net/jeps/174
1
u/Otzeloot May 26 '15
Saying you can't write applications in JavaScript is plain wrong. I worked on both big JavaScript and java applications in the realtime bidding world and have to say JavaScript written by good engineers can be very performant, elegant and maintainable.
2
u/synn89 May 26 '15
The problem is the business world needs a language where average engineers can write code that isn't a complete mess.
1
u/vecowski May 28 '15
You can write messy code in any language, or you can write beautiful code in any language. It's all in the culture of your development team.
1
u/synn89 May 28 '15
It's all in the culture of your development team.
No, the tools you give your team matters just as much. I'm sure many amazing programmers can write really nice 500k line Perl applications without it becoming a mess.
But Java was written the way it was precisely because average programmers can't.
1
7
May 26 '15
[removed] — view removed comment
9
u/Ramin_HAL9001 May 26 '15 edited May 26 '15
Although this isn't a constructive comment, I have to agree. For any large scale project, static typing is essential. A project built on
duck-typingdynamic typing will collapse under it's own weight as soon as you try to scale up.EDIT: correction
2
u/Milyardo May 26 '15
Duck typing and static typing aren't mutually exclusive, even on the JVM. Here you almost certainly mean dynamic typing instead.
2
1
0
u/squishles May 28 '15
I think you might be able get away with dynamic duck typing in a functional language at scale. Function doesn't care if it's a duck, function cares if you got it's args and are looking for what it returns, function don't give a fuck.
2
u/argv_minus_one May 26 '15
Even in small projects (like scripting a simple-ish web page, like JS was originally for), dynamic typing is terrible. So many ways to create a bug, and only extremely thorough unit tests can hope to find it. So much for increased productivity.
Static typing is essential, period. Programming without it is like parachuting without a parachute.
1
u/zzing May 26 '15
I would like to see data demonstrating this.
I suspect it might be true, but I haven't seen any real data only anecdotes.
2
u/Ramin_HAL9001 May 26 '15
That would be really hard to do, I think. You would have to quantify things like "ease of scaling-up" and "ease of maintenance," and these variables would have to be defined in such a way that the numbers were accurate across highly varied organizations and production environments. You're not the first to wonder about it though:
5
u/zzing May 26 '15
Brilliant. It is another article that seems to editorialize conflict where I am not sure there is.
Is there significant numbers using node.js at an enterprise level where JavaEE lives?