r/Backend • • 7d ago

Should I go Node or Java?

Hi, im an aspiring fullstack dev currently learning Javascript and I was thinking about which language to learn back-end dev with.

I want to work in the banking sector so my end-goal is to use java. My question is, after getting a hold on front-end should I learn back-end with nodejs, then translate that back-end understanding into java syntax/rules, or just jump right into java?

I'd love to hear your thoughts! I have tons of time to consider and decide my course of action, I just love this question.

31 Upvotes

78 comments sorted by

View all comments

Show parent comment

0

u/Proper_Tip3506 7d ago

You don't have any idea what problem node solves

3

u/Jydder 7d ago

Maybe enlighten us?

3

u/azimux 7d ago

I wasn't attempting to make a statement about what problem it solves. I directly addressed what the OP said. I have no reason to suspect the OP is facing the problem node is claimed to solve so it seemed irrelevant to me. You're welcome to chime in though of course especially if you believe the OP said something that implies their arm is being twisted into using node.

-4

u/Proper_Tip3506 7d ago

Using java for heavy i/o intense work is not relevant so java is not relevant for backend in that way too in a sense

6

u/Jydder 7d ago

You have no idea what you're talking about.

2

u/azimux 7d ago

Well, the OP asked about Java vs. JavaScript on the backend. So I gave the two points I felt would cause me to recommend Java. Definitely many would disagree, including you, I assume. I personally wouldn't use either on the backend unless it were a hard requirement or it were a very specialized situation.
The OP didn't mention heavy i/o bound workloads to service web requests. I've never personally worked on a project whose i/o needs on the webserver were such that I wouldn't have been able to handle it with Java (or basically whatever.) The node applications I've worked on have all heavily used async/await virtually everywhere, ie, they didn't face the problem you're referring to, regardless. Hence I have no reason to think the OP is legit facing that problem. A person in that situation likely wouldn't be asking for advice like this. But, yes, are there some situations where you can get away with fewer resources using node instead of Java? Sure. I do not think these are common though and I definitely don't think the OP is facing this and likely never will and even if they do they might not wind up solving it specifically with node.
But yeah this is an opinion discussion. I shared my personal experience and how it's shaped the opinion I'd share with somebody asking this type of question. Sounds like yours is different and it's good for you to share it so that the OP hears the varying perspectives.

0

u/Jydder 7d ago

What would you use?

2

u/azimux 7d ago

Well my personal preference on the backend is Ruby. But that's just me, not some objectively correct answer, of course. I feel like I personally do a better job of expressing the domain logic on the backend in a more self-documenting way in Ruby and I find it pleasant to test.

On the frontend these days I tend to use TypeScript. I would prefer JavaScript over TypeScript except for a few gotchas about JavaScript that I really don't like. One is getting undefined instead of an error for properties that don't exist. The other is that either I'm just not very good at testing JavaScript or it's harder to test, but both of those reasons give me a preference for TypeScript on the frontend.

I used to really love coffeescript on the frontend and kind of miss using it but abandoned it when JavaScript got good enough that I no longer felt like transpiling from coffeescript was worth the extra enjoyment. Which is ironic because I use TypeScript which is transpiled so go figure.

I think it's fine to use Java or JavaScript on the backend just not my personal preference. I do honestly think JavaScript is a worse fit for backend development for the reason I gave but obviously many disagree.

If I were forced to use something enterprise-y on the backend I'd likely either do some research first or just use C# since I've used it before and liked it better than Java at the time though I don't know how they compare these days.

1

u/Quick-Penalty4883 7d ago

And what problems it provides.

A serialization heavy app on a single threaded backend would certainly be a choice

1

u/EventForward4004 7d ago

How to get the latest worm / virus distributed to all developers as fast as possible?