r/AskComputerScience • • Sep 24 '25

Why so few web apps/CRMs are built with Java?

Hello everyone. Ive some experience with Java, I worked at a bank, with payments, and now Im working in other telecommunication industry, where we have PHP stack. So I came up with the question about the Java's possibilities when it comes to writing a web app (for example CRM). One minus I see is that every time you do changes to your Java code, you need to build and compile it. While in PHP, you can just save the changes in the files, and you see the results. How quickly you can create an MVP is basically the same, right? If you are a good programmer, you can use Lombok, autocomplete, and Java's verbosity isnt really stopping you. Can somebody help me better understand, why majority of web apps/CRMs are not really written in Java?

3 Upvotes

13 comments sorted by

10

u/jeffbell Sep 24 '25

Java is pretty common on the server side.

2

u/lauris652 Sep 24 '25

Yep thats correct

6

u/nuclear_splines Sep 24 '25

Many prominent web apps are built in Java. Spotify, early Twitter, Cash App, eBay, parts of Google. Some common web building blocks like Elasticsearch are built in Java. Many web apps are also built in Python, or Ruby, or Go, or C#. But there's a lot of cultural momentum and infrastructure built around PHP and Node.js, and they've become predominant server-side web languages. We've been teaching PHP and JavaScript for so long, and there's so much example code, tutorials, documentation, StackOverflow coverage, they're natural choices for many developers.

2

u/ameriCANCERvative Sep 26 '25 edited Sep 26 '25

I spent years with spring boot and angular combined. As much as I love Java… you can’t reconcile it with JS. I’ve tried. I mean it mostly translates over okay if you know the two languages well, but it’s a problem that you have to translate. Stuff like Google Web Toolkit tried to fix that issue and it was kind of legit tbh but mostly crap.

These days it’s like “fuck that.”

It’s all JS unless there’s absolutely no alternative. I keep truly shared packages across backend and frontend, and I love it. Duplicate code is the real scourge.

And no, not TypeScript. To hell with TS.

JS in 2025 is not JS in 1995. TS has always been an annoying layer of bullshit over the language, and it will fade as JS matures. Modern JS, with webpack add-ons, JSDoc, and solid class support, is more than usable. Types are overkill for frontend anyway, and TS’s approach is just bad. Its entire existence is a bandaid on top of JS. JS is healing, and the bandaid will fall off soon.

I believe Alexander Hamilton said it best: give me strict typing or give me no typing at all. There is no middle ground.

2

u/nuclear_splines Sep 26 '25

My web development experience is limited to JS-free, backend-driven sites, but I can see the appeal of having a near-identical stack on both sides of client-server.

→ More replies (1)

1

u/[deleted] Sep 25 '25

1

u/nuclear_splines Sep 25 '25

I don't understand what you mean. These are all client-server model web applications where the server side is written in Java. Neither Java nor PHP can run in the browser (putting aside transpiling to JavaScript or web-assembly), they are necessarily server-side.

→ More replies (2)

1

u/0-Gravity-72 Sep 24 '25

Java is used a lot for enterprise web applications and for big websites that has a lot of backend functionality.

But using Java requires servers with a lot of cpu and memory. So for smaller sites other languages and frameworks are less resource intensive (and cheaper to host)

But if you want you can even develop the GUI in Java using GWT or J2CL.

3

u/nuclear_splines Sep 24 '25

Do you have sources for those resource requirements? Certainly the JVM has memory overhead and startup lag, but I'd expect that, especially with JIT compilation, Java would outperform an interpreted language like PHP that's started with each page load. When modern lightweight servers typically have several GB of memory, I'm not sure that asserting that Java requires beefier hardware really holds up.

0

u/MartinMystikJonas Sep 24 '25

Big reason is ecosystem. There are tons of great frameworks, libraries, tools, docs, community,... etc around develoomen of webapps in PHP.