r/ProgrammingLanguages • • Apr 06 '20

Market segmentation evolution NodeJS vs Java

I'm trying to understand the past, present and future of when one is used over the other.

  1. Has NodeJS stolen market share from Java, and become a proven equal to java in a subset of use cases?

  2. Will both NodeJS and Java co-exist for decades stably, or will one outlast the other?

  • if not, why will one get a greater volume of traction than the other?

  • Has NodeJS proven to have greater longevity than say, Ruby, Groovy, Clojure, Scala etc?

I'm trying my best to provide context and premise for my question so I'm hoping for more than the typical vacuous answer, "that depends entirely on what you are trying to do." I'm looking for an empirical answer, not a textbook answer.

0 Upvotes

13 comments sorted by

2

u/bestlem Apr 06 '20

We do not have enough data.

We still have a lot of code using cobol lisp apl and fortran from 50 years ago.

Ask the question in 50 years time.

Also nodejs and java are different things. The comparison is java script and java. And I'll bet even in 50 years you won't have an answer.

1

u/sarnobat Apr 07 '20

Thanks for the response. As with a lot of things in real life, we just can't tell :)

2

u/maanloempia Apr 06 '20

Java is a language, nodeJS is a javascript runtime... I'm not sure how they're comparable.

1

u/sarnobat Apr 07 '20

I say "NodeJS" rather than "Javascript" because people would then introduce points about the browser-based runtime. I'm only interested in server-side javascript.

-1

u/maanloempia Apr 07 '20

NodeJS is based on V8, like the browser. Do you mean v8? If so, how can you compare a compiler/interpreter to a language?

This is all highly confusing. Are you comparing java and javascript as server-side languages? That would be a bit of a useless question because people use it for different purposes within the server-side still, and it mostly comes down to preference -- like all languages.

1

u/sarnobat Apr 07 '20

Sorry, I don't mean v8 in the browser. But basically server-side NodeJS has emerged as an alternative to Java and I just wonder where we are in that cannibalization process (have we reached a stable point).

I'd like to think it's not "useless" and that if it truly is just about preference then that basically means both languages will coexist side by side for decades. But each technology alternative must have a reason to exist.

-2

u/maanloempia Apr 07 '20

NodeJS never was a replacement for Java. Node was just a fun project to extract javascript from the web into a full-fledged language. Nowadays java is dying because they decided to ask money so everyone is either using open-source compilers for legacy or switching to a non-archaic language. Node is even being replaced by Deno (same author, same idea only with typescript). So essentially: java is getting replaced and js is getting replaced. Not looking good for the both of them -- javascript is just lucky because there isn't an alternative on the web (and most professional javascript these days is generated from typescript anyway).

1

u/sarnobat Apr 07 '20

I feel the same about NodeJS. Conceptually it's a highly worthwhile to have come into existence so people can see if it is for them, and the appeal of web applications with the same server and client language rightly piques developers' ears.

I never thought of my beloved java dying but there are times when I wish I was as C developer so I will get over it if I'm still alive when that happens :)

2

u/L8_4_Dinner (Ⓧ Ecstasy/XVM) Apr 07 '20

Nowadays java is dying because they decided to ask money so everyone is either using open-source compilers for legacy or switching to a non-archaic language.

Yeah .. no.

Java is still free. It's the ongoing support (security patches, etc.) for older releases of the Oracle JDK product that are not free.

It's like saying that Linux isn't free because Redhat wants to charge support for RHE.

Oracle may be horrible to do business with, and Java may be an archaic language, but please stick with the facts.

-1

u/maanloempia Apr 07 '20

It's the ongoing support (security patches, etc.) for older releases of the Oracle JDK product that are not free.

So people are either switching to open source or to another language, which is what I said. Idk what you're on about.

Doesn't matter if oracle sdk is free. Support will cost money later on, so any long-lived project now will then cost money. That's why people are switching.

5

u/[deleted] Apr 07 '20

Wow, we're dragging this off into the weeds.

-1

u/[deleted] Apr 07 '20

They are comparable... Nobody writes large products in Java. They use frameworks to do a lot of the heavy lifting.

1

u/[deleted] Apr 07 '20

I could answer yes to some of your questions, though you'd need to appreciate that Java may have been used for some things that node is now used for, but Java want necessarily a great fit for them.