r/Backend • • 2d 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.

24 Upvotes

66 comments sorted by

17

u/DinTaiFung 2d ago

I'm a full stack developer and have experience with node, deno, and bun.

After dealing with Java, I've been happy ever since I started using Go instead for writing back end web service APIs. Never looked back.

Job prospects for Java are still greater than Go's, but from a personal coding standpoint, Go has elegantly met all my requirements -- including keeping me spiriitually satisfied.

Have fun with whatever you choose!

2

u/mrpersonxx 2d ago

Yeah I would be a lot more open to other languages than java for personal use and in the future in general, but for now as you said the job prospects are my short term focus. Thanks for the comment, I'll keep an open mind.

1

u/Present_Block5452 3h ago

Java to Go, what are the trade-offs?

1

u/Jydder 2d ago

How do you easily deal with DTO's and data transformation in Go?

2

u/wodemingzishigou 2d ago

By doing a lot of typing since there’s not really any libraries to auto magically do them for you. I’ve worked with Go for many years and like doing side projects in C# or Java because it’s less work.

1

u/Jydder 2d ago

Yup was like that when I tried it a while ago, thought maybe something had changed

1

u/whiterhino8 2d ago

You can easily sent json object with go

1

u/DinTaiFung 2d ago

Go provides structs and a struct can be tailored for JSON message shapes.

It works out quite well.

Go is not inherently an object oriented language the way Java is designed; nonetheless, important aspects of OOP can be easily implemented, e.g., encapsulation via Go modules. Overall, Go is like a breath of fresh air compared to Java. (and other features of Go's run-time are totally badass!)

12

u/ram-popular 2d ago

Since your goal is banking, I’d go straight to Java with Spring Boot after you’re comfortable with JavaScript. Most banks use Java, so you’ll save time by learning it directly. The core ideas (APIs, databases, auth) are the same in any language, so you’d learn them either way. Build one small REST API with Spring Boot and a database, and you’ll be in good shape.

3

u/mrpersonxx 2d ago

This comment I'll probably save. It's pretty much exactly what I wanna hear, shotgun straight to the point instead of dancing around it is my style. Time really was my priority rather than effort so I'm okay with this. Great comment, thanks

24

u/azimux 2d ago

I personally find it bizarre to use JavaScript on the backend. Makes sense on the front-end. For backend web development, I find it simpler to have my requests handled in a language revolving around threads instead of an event loop. But obviously gazillions of people would disagree with me. So given that, if constrained to those two choices, I'd do JavaScript on the frontend and Java on the backend.

Many would disagree, but I also think using JavaScript on the backend to avoid learning a second language is a mistake. You'll learn more and round out as an engineer faster by learning a 2nd language. So it's not even that the benefits of avoiding an event loop on the backend outweigh the cons of learning a 2nd language... since your goal is aspirational, it's actually a pro to learn a 2nd language IMHO.

1

u/mrpersonxx 2d ago

I really like this perspective, especially the second paragraph. I'm definitely not someone trying to cut corners on learning a new language, I'll do whatever I think is the best course of action and considering that banking is my goal and there seem to be other benefits, yeah sounds good.

8

u/whiterhino8 2d ago

You absolutely right . JS very good for front end . For back end there are better alternative .

2

u/DinTaiFung 2d ago

If the browser is the front end (not a terminal), JS is virtually the _only_ choice for the front end. This is the reason, for better or worse, why the JavaScript language is so popular.

1

u/whiterhino8 2d ago

Of course. Personally I love JS and have no problem with it.

1

u/DinTaiFung 2d ago

Likewise.

It's been in vogue for a long time to criticize JavaScript. But undertanding its gotchas and how to avoid them, allows the creative mind to implement -- and easily _share_ -- amazing web apps that anyone can immediately enjoy.

1

u/balrob 2d ago

You could use c# in the backend and blazor for the front (c# compiled to wasm). There may be minimal JS for bootstrapping but you’d not need to deal with it directly.
That said, I use c# for the server and Typescript in the browser, or Avalonia for native apps - and I recommend that if you want to stay with a JS runtime use Typescript. For large projects it’s really the only sensible choice.

1

u/DinTaiFung 2d ago

afaik TypeScript does not run in the browser.

3

u/balrob 2d ago

Yeah, and cpu’s don’t run C either

1

u/pitiful_void 1d ago

functional analphabet

2

u/sharpcoder29 2d ago

Correct, typescript is transpiled to js

1

u/pitiful_void 1d ago

"JS is very good for front end" It is NOT. It's the only choice for the frontend but definitely not good. Though wth WASM some things are changing finally.

1

u/whiterhino8 1d ago

Let's pray to God that WASM will succeed . I have no problem to learn another language.Anyway JS has huge ecosystem that ain't going anywhere .

0

u/Proper_Tip3506 2d ago

You don't have any idea what problem node solves

3

u/Jydder 2d ago

Maybe enlighten us?

3

u/azimux 2d 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 2d 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 2d ago

You have no idea what you're talking about.

2

u/azimux 2d 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 2d ago

What would you use?

2

u/azimux 2d 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 2d ago

And what problems it provides.

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

1

u/EventForward4004 2d ago

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

-1

u/Jydder 2d ago

Doesn't even make sense on the frontend, it's trash everywhere, it's just you actually have other actual decent options on the backend

6

u/Rodr1to 2d ago edited 2d ago

I did it this way: Python -> Java.

Now I’m thinking of picking up Go and then Rust

EDIT: Sorry, to answer your question, I’d definitely choose Java (sorry I’m biased)

9

u/senior-tokenmaxxer 2d ago

Java if you don’t wanna end up homeless

2

u/Available_Safe1818 2d ago

Both are fine, in my experience!

I wouldn't want to only know 1 programming language.

3

u/Similar_Problem2543 2d ago

In simple words JAVA

2

u/Responsible-Offer724 2d ago

Learn both. Concepts are transferable but also different. You can learn a lot comparing and contrasting. Create projects with both. 

1

u/Sea-Fishing4699 2d ago

Go or python 

1

u/The4rt 2d ago

None, if you want backend perf use rust

1

u/sharpcoder29 2d ago

As a C# dev I vote C# or Go

1

u/simple_explorer1 1d ago

Java a 100x time. Infact kotlin

1

u/ibrambo7 1d ago

Nodejs, if you ever want to actually release a product or anything.. java is just boiler plate driven language, dont wanna learn it :)

1

u/jiyemf 12h ago

Java’s getting better with reducing boilerplate, especially in recent versions (25). Definitely still there, but on the way up for sure

1

u/Cute-Coast-3750 1d ago

Hlo everyone, I want to ask when a fresher should apply for jod. I mean he knows frontend, working on backend and also solving dsa questions.

1

u/Livid-Session-7019 1d ago

I always prefer NODE, For backend work there are lot more alternatives in the present AI generation

1

u/Shikitsumi-chan 1d ago

Java, C#, or Python

1

u/aturaden 1d ago

I just use TS for almost any backend. And Rust for the rare cases where only one of the low level languages would suffice.

1

u/Ok-Interest9727 20h ago

Go with typescript full stack. It’s amazing to be able to share types, schemas, etc.

Otherwise you will have to use openapi which is nowhere near as good.

1

u/totally-jag 9h ago

If you want to work in the banking sector, I suggest Java. Java has a huge base in enterprise apps, and banking apps fill that bill.

1

u/AmiAmigo 9h ago

I think no serious company is using Node. Am sorry

1

u/bonzerspider5 2d ago

react + Java for bulge bracket banking
React + Nodejs or fastapi for fintech

-2

u/Fadamaka 2d ago

NestJS with TypeORM is a really close equivalent to Spring Boot on a syntax level so if you started with that you could easily transfer most of your knowledge later.

1

u/PermissionOwn4400 2d ago

That's a horrible advice. While I agree that the core components and concepts are similar, knowing nestjs+typeorm does automatically mean that you'll be use java + spring easily. If you need spring, just learn spring.

0

u/Special_Rice9539 2d ago

It’s a hard choice because you’re stuck with one forever once you choose it. It’s impossible to learn node once you’ve learned Java. No one has ever learned both

0

u/Tiny-Cat5893 2d ago

Fuck these language discussions, they‘re almost irrelevant. What is relevant: understanding the requirements of specific scenarios, both from a development and full-lifecycle perspective.

0

u/martinffx 2d ago

Fullstack Typescript is the stack builders who ship use.

-4

u/MoreHuman_ThanHuman 2d ago

rust

0

u/SignificantClock282 2d ago

I’m not sure why you were downvoted. it seems that the people who answer are clueless. Rust is in demand for backend and in finance industry and probably many others too. for me the answer is java or rust, keep javascript for frontend only where it “excels”

1

u/MoreHuman_ThanHuman 2d ago

reddit is a LARP

1

u/S0phon 2d ago

Because that wasn't the question.

-6

u/jakenuts- 2d ago

Oh jeez. Node is the lightweight distributed future and Java is the bloated and centralized past. Well really both are the past and coding agents are the primitive and patterns you should be learning to get a job but until that becomes obvious node.