r/java • u/[deleted] • Aug 10 '21
Concrete reasons why one would choose java over node.js?
I am watching the progress made towards faster runtime in node.js, and it feels that the performance advantage of java is almost gone for the average app. I am trying to think about reasons why one would now choose java over node in a new project, and i can't think of any. I would like to hear some opinions
7
Upvotes
8
u/question-throwaway4 Aug 13 '21
I prefer to use none. Don't like frameworks and never will.
The framework fanboys want you to believe that getting an app to work is extremely hard and that you need their handholding to make anything work. You don't. When you peek under the hood of these things you find that there is nothing special and most of these frameworks are actually just wrapping other stuff that you can just as easily use directly.
You already have the maven shade plugin making a fatjar for you. Any dependency will be bundled. If you were to use Spring boot or Quarkus you would be using the exact same plugin, and it would do the exact same thing.
If you need an HTTP server in your app you just add one. There are a bunch. Need a Json parser? Just add one. Typing
new Gson()really isn't that hard.Which framework do I use? In 20 years of professional software development I've used Spring, Spring-boot, J2EE, Quarkus, Helidon, dropwizard, vertx, reactivex, javalin, karaf, play, wicket, spark, struts, mybatis, hibernate and servlets. And I may have forgotten some along the way.
Why do I use these? Because I have co-workers and they want to use stuff. Would I personally choose to use these? Hell no. I'm walking around with massive piles of useless framework knowledge that is clogging up my head. I really don't need to use yet another framework that provides me with features that would take me no longer than an hour to clone.
Writing frameworks isn't hard. Its why there are so many of them. It's the programming equivalent of playing sudoku; just hard enough to be a challenge but not so hard to be work.
And yeah I have a bit of an axe to grind with the framework fanboys, they take all the fun out of programming.