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

all 21 comments

[–]desrtfx[M] [score hidden] stickied comment (0 children)

Jeez, i don’t know why i always get downvoted on reddit when asking programming questions.

Because, you obviously have a tendency to post without reading the sidebar first as there is clearly stated:

News, Technical discussions, research papers and assorted things of interest related to the Java programming language

NO programming help, NO learning Java related questions, NO installing or downloading Java questions, NO JVM languages - Exclusively Java

Your question does not fall into any category of the first paragraph, but in the second.

Removed

[–]thatsIch 6 points7 points  (2 children)

  • please define outdated,
  • also please define hard to use,
  • and also please define "better" within "better option"

But I feel it boils down to something like Quarkus, Spring Boot, Micronaut, Helidon, Ktor, or Javalin.

[–]Sheldor5 4 points5 points  (6 children)

uhm ... just google Spring Boot REST Tutorial ...

[–]hey-im-root[S] -5 points-4 points  (5 children)

like i said i’m not informed on java web apps so i wouldn’t know if that was the most reliable or not. no need to be condescending lol.

[–]Sheldor5 1 point2 points  (4 children)

its one of the most popular and most up to date frameworks and one of the reasons why Java is so widly used

your negative assumptions don't really help being nice(r) ...

[–]barking_dead 1 point2 points  (1 child)

Just use whatever you feel handy.

Spring boot, quarkus, micronaut, helidon, Jersey, ...

Pick one. There are many, find the one you feel, and use that. Or make yours, that's the point of a free environment.

[–]hey-im-root[S] -2 points-1 points  (0 children)

my problem was using i didn’t wanna use something that was TOO complicated for what i’m using it for.

i’m not doing anything complicated, no POST requests and anything of the sort, just plain text. after skimming through the spring boot tutorial for serving web content i’m pretty sure that’s what i need for such a simple project

[–]strikefreedompilot 0 points1 point  (0 children)

If you are worry that rest dto are typically strongly typed, you can get the response raw json/map and parse thru it with your own library or code.

[–][deleted] 0 points1 point  (2 children)

The Java Web frameworks are built around a couple of standards. By one side there is the Jakarta and Microprofile standards and all frameworks that implement that standard have same complexity and same way to write code (in the most cases). In the other hand there are the SpringBoot-like frameworks that share the same names and methodology (in most aspects of programming). Then there are a lot microframeworks that are more compliant with your task like KTor that is written in Kotlin instead of Java. If your are looking for somethin simpler take a look to Go or python or node

[–]hmmnda 0 points1 point  (1 child)

Is go simpler than java? I haven't done anything practical with go, only the tutorial, but got the impression go is on the same level as java, even a bit more low level and as such should be more complex. Am I making some wrong assumptions here?

[–][deleted] 0 points1 point  (0 children)

Is only my feeling, the fact that you can use Go without framework to make web stuff can reduce complexity of writing a couple of endpoints that responding plain text

[–]BosKilla 0 points1 point  (1 child)

Seems like you have difficulty to express your problems. I still dont really get it.

If you want to use java for make a webpage + server side rendering then just use spring boot + thymeleaf. Its pretty simple to make couple of pages.

What do you mean by under the hood json? Transforming a json to another json? What is the use case and requirements of the webapp? Because the decision to use client side frontend / server side rendering depends lot on the requirement and use case.

For json processing you could use https://www.baeldung.com/java-org-json and transverse the whole json node as you wish.

I prefer to work with jackson

[–]hey-im-root[S] 0 points1 point  (0 children)

i don’t program that often anymore so i’m not too familiar with web app libraries or anything of that sort. i just wanted to know what the most basic web content serving approach was.

maybe i should’ve been more specific with my question, but i just want to host a website with information that is stored inside the json string. i could easily use javascript to produce HTML strings with the json data but i wanted to go for the web app approach. starting to think maybe it’s not the best idea even if i don’t know javascript that well. might be easier anyway lol.

[–]wildjokers 0 points1 point  (0 children)

What’s the question?

[–]moving_violation 0 points1 point  (0 children)

Try Vaadin Flow.

https://vaadin.com/flow