r/Backend • • Oct 11 '25

Why choose Node over Java?

I'm an engineer with 15 years of experience and still don't get it. Afaik the most popular nest.js is way less powerful than spring. Also lack of multithreading. Recently see a lot of startups picking up Node. The benefits of using it are still obscured for me. Please explain!

226 Upvotes

191 comments sorted by

View all comments

26

u/Prodigle Oct 11 '25
  • Most modern web back-ends are IO strained, not CPU, and node handles IO *really, really well*

  • Node/JS is very productive to work in nowadays, and has a really extensive (and easy to use) ecosystem

  • Typescript especially has *easily* the most comprehensive and great type system of anything I've ever worked with. The fact it's built on top of a dynamic language is insane, but there you go.

  • Backend/Frontend using the same language means most of your data classes and libraries can be defined once and shared between both projects

  • The most barebones express.js web server is a very small amount of code to understand, and frameworks exist for larger things, so you can build at essentially any scale/demand and be okay

That's the majority of it.

1

u/notoriousrogerpink Oct 13 '25

I find it incredibly difficult to believe anyone would willingly point to Typescript as a good type system u less they literally hadn’t used anything else out there… it’s impressive with what they were able to do no doubt but it’s not in anyway good let alone a leading example. 

2

u/Sea-Quail-5296 Oct 13 '25

Yeah try C# then talk to me about a good type system. TS makes JS bearable in terms of type safety and it’s an amazing accomplishment if you think about what lies beneath

1

u/DizzyAmphibian309 Oct 15 '25

Typescript and C# were created by the same company, so they definitely incorporated all their lessons learned from C# into Typescript. I haven't encountered anything I could do in C# that I haven't been able to do in Typescript, but there's plenty of things I can do in Typescript that I can't do in C#.

1

u/ReticulatedSpline78 Oct 17 '25
  • by the same person: Anders Hejlsberg

1

u/Prodigle Oct 14 '25

Having to deal with JSON in C# enough times led me to really valuing being able to turn on and off various parts of the type system really easily.

If you're making a lib you can make it absolutely bulletproof at "compile" time with what it will accept. If you're mid-development of something less critical you can bin most of it and be productive.

Traditional typed languages give you more bulletproof guarantees, but nowadays I find you really do pay for them.

1

u/Theendangeredmoose Oct 15 '25

really?

I've worked with a number of typed languages - Java, Go, Rust and Typescript. I'd argue Typescripts is leagues ahead of Go's, better than Java's, and marginally worse than Rusts. I do love the flexibility that TS' type system has over Rusts, which I find useful for backend web dev.

what makes you say it's not good?

1

u/notoriousrogerpink Oct 15 '25

For a number of reasons. Most importantly I would say that it’s not sound and you can’t actually trust it would be the number one reason. But secondly it’s filled with some incredibly incredibly weird stuff like this: https://www.typescriptlang.org/docs/handbook/mixins.html

Compare and contrast this with another language which also compiles to JavaScript but has a genuinely great type system: https://dart.dev/language/mixins

1

u/coraythan Apr 19 '26

I mean I prefer Kotlin myself. But sometimes when I go back to Kotlin for personal projects (TypeScript pays the bills) I find myself frustrated by the inflexibility and lack of expressiveness of more formal typed languages.

Things like union types and implicit types are nice and convenient in TypeScript.

Honestly at this point after like 13 years as a developer, and having always been a very object-oriented and compile time safety kinda dev, I prefer TypeScript's type system over others. The things I miss from Kotlin when I use TypeScript are just things like extension functions, better null-handling operations, more comprehensive standard library, better functional programming options, better Collections types and stuff like that.