Hacker News new | ask | show | jobs
by BFLpL0QNek 1222 days ago
Java web applications I’d describe as “boring technology” if you want typical rest applications with SPA frontend or a full stack server side rendered (SSR) app. By boring I mean it works with little fuss or churn.

Depending on your scale/budget they’re a bit more expensive to host due to JVM memory requirements but performance is good. Not a Java issue but a issue if you choose a language other than JavaScript for the frontend is you need to up skill frontend devs with the Java build tools/templating libraries and most frontend devs will have a bias against Java as it’s been bashed by lots of people who haven’t used it, it’s not sexy and they think of Java aplets from the 2000s.

1 comments

For web apps, why use two languages if you can get away with only one? unfortunately, is hard to beat JS/TS here.
That “if” part carries a lot of weight. There’s a whole branch of questions around the quality and suitability of tools available - for example, I was surprised when we hired a couple of JS specialists and their Next.JS project left me surprised to see how many areas it was behind Django circa a decade ago when it came to basic things like performance, authentication, internationalization, etc. and that massive tool chain soaked up a good chunk of time on an ongoing basis.

The deeper question is how often you actually benefit from code reuse. There are certainly some areas where you can share things but you also run into a lot of coordination concerns because the environment for JS in a browser is not the same as in Node, which increases the friction of sharing, and a large chunk of the benefits are things like data validation which can also be substantially eased with things like JSON Schema. Simplifying those test matrices and formalizing your boundaries has more value than I tend to assume at first.

Depends. I hate the whole JS ecosystem and NPM hell so if I can get away, I do. I can never go for JS on the backend personally. I am happy with good old PHP, Go, Python etc.
TypeScript on the backend gives you that same PHP feeling though.
If you're a one man show, I think it's a fair argument.

With more people working on it, like typical companies, it doesn't hold a ton of water. Every language has its place to where it's best suited. You can get a more performant, better structured, and safer backend in other languages.

In typical organizations, you always have a grizzled backend developer well-versed in creating REST backends in Java and a frontend developer well-versed in whatever. So you play to their strengths.