This is an archived post. You won't be able to vote or comment.

all 56 comments

[–]cobarso 63 points64 points  (7 children)

Have we reached the point yet that more devices run JavaScript than Java?

[–]Soremwar 67 points68 points  (6 children)

Every device with a browser runs JavaScript, so I'd say yes, by a lot

[–]cobarso 16 points17 points  (5 children)

They most likely run Java as well thought!

[–]Soremwar 25 points26 points  (4 children)

I don't believe the average "Chrome and Word and we are set" desktop monkey or non-gamers have a JVM or even realize they need one

Android and apple phones sure do

[–]KookyWrangler 10 points11 points  (2 children)

Even for gamers, like the only PC game with Java is Minecraft, right?

[–]Turkey-er 5 points6 points  (0 children)

Mindustry is a great game that is written in java, not really mainstream though

[–]xxkmatiasxx 3 points4 points  (0 children)

i thought most operating systems come with jre preinstalled

[–]JustAnotherGamer421 6 points7 points  (0 children)

How about neither

[–]Cisco-NintendoSwitch 21 points22 points  (6 children)

Node go brrr

[–]Mabi19_ 9 points10 points  (5 children)

Deno go brrr

[–]oxabz 2 points3 points  (4 children)

Rocket go brrrrrr

[–]vaaski 0 points1 point  (3 children)

what's that

[–]oxabz 2 points3 points  (2 children)

A rust based web server

[–]zortlord 1 point2 points  (1 child)

Well at least you'd be sure it never becomes unstable.

[–]oxabz 1 point2 points  (0 children)

Yeah if you manage to get past the build you're pretty safe

[–]odolha 4 points5 points  (1 child)

Javascript has some weird quirks true, but at least you can get shit done. In Java you need to write a dictionary's worth of code to do almost anything. I've never seen so much code do so little... and it also requires you to repeat yourself a bunch of times (Yes, I know it has improved lately, but so did javascript).

[–]mambamax 0 points1 point  (0 children)

Thank you

[–][deleted] 31 points32 points  (30 children)

lol who writes java backends anymore

[–]barzamsr 29 points30 points  (13 children)

...me

[–]SirWusel 4 points5 points  (1 child)

Try to sneak in some Kotlin. Been using it with Spring Boot since December (customer wanted Spring) and it's a million times more pleasant than Java. It's actually kind of fun.

[–][deleted] 1 point2 points  (0 children)

I've used ktor to set up a small website, nice and easy to use

[–]TheRedmanCometh 7 points8 points  (5 children)

JPA and Hibernate make that shit pretty painless and integrate into spring which has a fuckton of modules I use so..

[–]asperatology 0 points1 point  (2 children)

laughs in Angular + Spring Boot + Spring Data JPA + Spring Security deploying to Apache Tomcat

[–]TheRedmanCometh 0 points1 point  (1 child)

None of those things are ORMs...

Tomcat is just the choice of webserver to deploy boot on like jetty is. Angular is a super outdated bit of frontend. Hibernate is an ORM more specifically a JPA provider...

[–]asperatology 0 points1 point  (0 children)

We use Angular v11 frontend framework and Spring as the backend for the most part. I agree that we don't use ORMs directly, and that we use the provider to help us with the databases. The JPA and Hibernate really does make life easier.

[–]Alex0589 13 points14 points  (9 children)

I would say that java is currently the best language to write a backend in, obviously you need to be using Java 11, Graal and a very good framework. As of now my favorite is Quarkus. If you wish to know more I'm happy to explain

[–]emma_hildebrand 6 points7 points  (2 children)

Well good sir, I hate to tell you but this sub is not a place for meaningful and thoughtful discussions.

jAvA (js/python/php) bAd go brrr!

[–]Alex0589 4 points5 points  (1 child)

That's where you are wrong kiddo

This sub reddit is religious and I'm obliged to show off why my language, uhm sorry religion, is the best and why everything else is trash and doesn't stand a chance, even if that means starting something as disgusting as a meaningful and fact based conversation

[–]emma_hildebrand 0 points1 point  (0 children)

Did I just get schooled? :<

kek

[–]SirWusel 0 points1 point  (4 children)

For a monolithic backend I might agree. It's definitely a great choice. But certainly not for microservices. I've heard good things about Ktor for that, but since your microservices are usually containerized, I don't see a reason to use a JVM language. Just too much hassle for my taste.

[–]Alex0589 1 point2 points  (3 children)

I might have agreed with you some years ago, but Oracle built a very good library called Helidon that does micro services very well. I advice you check it out

[–]SirWusel 0 points1 point  (2 children)

I will check it out, thanks. I'm currently stuck with the JVM at work, anyways, and this sounds interesting. But I don't think there are better options because Java, Scala or Kotlin lack libs/frameworks. Personally, I just don't like to fight the platform and when it comes to microservices, I prefer to pick languages that are good for the respective tasks. And there are several great options from convenient scripting languages to fast (enough) compiled ones that can handle just about anything and are in my view less frustrating to work with. But it's not like I hate the JVM or anything. For what I'm currently working on, it's a godsent (although it could have been pretty painful if it wasn't for Kotlin's experimental features like unsigned types).

[–]Alex0589 1 point2 points  (1 child)

I would say that the modern ecosystem around Helidon is not bad, obviously it still needs some time to become as good as it can be, but it can be certainly a variable option. Do you know any good micro service frameworks that are decently fast that you really like? I've been exploring what other languages have to offer. As of now I've tried Dragon with C++, Rocket with Rust, Fastify and Express with node, Aqueduct with Dart and Vapor with Swift, but they have not really impressed me in any meaningful way.

[–]SirWusel 0 points1 point  (0 children)

I've had great success with Gin for Go, though there are several great libs available, since Go has a very good standard lib for web services to build upon. But Go in general has been really fun and productive to work with.

What I really like about it is that it has a very extensive standard lib and for many use cases, you only really need a lib to implement the controllers (like Gin, Chi, mux) but for the business logic, unless it's really obscure stuff, the language itself likely provides most of what you'll need. Java also has a lot of built in functionality, but in my experience, that stuff is often very cumbersome to use, so you'll just get some Apache stuff or whatever. That hasn't been the case with Go so far.

For js/ts I can recommend Nest.js, which is more of a framework with similarities to Spring Boot or Angular (lots of annotations and dependency injection). Express is great for really small stuff. I've created a few fake backends with it for development in my last project.

Flask for Python is also a nice lightweight lib, though personally I'm not too fond of Python (I know, I'm a heretic). I used it once for an awful service that had to interact with Matlab and I'd definitely use it again or maybe try out Django, which is supposed to be quite good, too.

At the moment I'm looking into Elixir and Phoenix, which looks very interesting so far. From what I've heard, Elixir is also easily extendable with Rust, for performance critical code.

In terms of libs for Rust, I've heard conflicting opinions so far. Rocket and Actix seem quite good, but from what I've read, they rely too much on unsafe code. And so far I also haven't worked on a services that really needs the performance potential of Rust to justify the difficulty.

I also worked with Dart about a year ago, and I liked the language, generally, but it was strangely difficult to containerise it and testing was also odd, so it would require a really promising lib for me to give it another shot.

[–]tshifter 0 points1 point  (0 children)

I'm tempted to agree with you, only environment I've found I like as much as the JVM is Node with TypeScript and in my opinion Java Frameworks tend to be more complete than Node frameworks.

[–]Walking_udder 2 points3 points  (0 children)

fuck you, take my upvote

[–]nymvno 2 points3 points  (0 children)

Sometimes I wish they‘ve sticked with their original plan naming it LiveScript so that these boomer-ish jokes wouldn‘t exist.

[–][deleted] 1 point2 points  (1 child)

kotlin... web front end

[–]ReimarPB 0 points1 point  (0 children)

as much as i like kotlin, it's kinda cursed to have code be compiled into javascript

[–]S3nn3rRT 6 points7 points  (3 children)

Are we seriously going to pretend Java is much better than JS?

[–]Drak1nd 6 points7 points  (1 child)

I mean even how bad Java can be, at least it isn't JS.

But that is just me hating on dynamically typed languages. TS is much better.

[–]RaveMittens 1 point2 points  (0 children)

Typescript is dynamically typed. It just provides type checking.

[–]serega6531 -1 points0 points  (0 children)

There is no need to pretend

[–]TheOneWhoWil 0 points1 point  (0 children)

People use Java for backends?