HACKER Q&A
📣 networked

What stack would you use to build a CRUD web app on the JVM today?


2015 thread: https://news.ycombinator.com/item?id=10302879. How have things changed since?


  👤 fayten Accepted Answer ✓
I highly recommend the following stack:

JVM Language: Java 11+

Webserver: https://javalin.io/

Templating: https://j2html.com/

Enhanced html attributes: https://htmx.org/

Database helper: http://jdbi.org/

Database: Sqlite or Postgres depending on the expected scale.

The startup time is very fast. I usually see times under a second, which makes iterative changes significantly less painful than something like Spring.

Also setup is ridiculously simple, just throw those libraries in a pom file and use a CDN for htmx. No front end build tools needed since htmx removes the need for most if not all of your javascript.

The whole setup feels kind of old school, but man it makes developing CRUD apps dead simple again.

Lastly, project onboarding is as simple as having someone download intelij and pulling the project. The built in maven and jdk to intelij is all they need. That is as long as you don't need them to run their own Dev database instance, but that's not the end of the world if you utilize docker.

Even if you decide on something else take a look at the above libraries, they're all pretty fantastic.


👤 harryvederci
- Backend: Clojure (with Reitit[0] for the API)

- Database: Postgres or SQLite

- Frontend: None, the backend serves html + js by combining htmx[1] and hiccup[2]

[0] https://github.com/metosin/reitit

[1] https://htmx.org/

[2] https://github.com/weavejester/hiccup


👤 croo
Spring Boot. But that's because I don't mind big binaries, fastest to be productive(for me!), every tool is just another autoconfigured include...

I would consider trading these for faster build times... I heard good things about javalin.

I would definelty use Java. I like it and there are tonns of new features in the 11+ versions. Boilerplate is greatly reduced by Lombok.

I would consider Kotlin for even less boilerplate and null handling.


👤 noughtme
Would anyone use Scala? If so, any recommendations on server libraries or frameworks? Had an interview with a relatively new company and surprised their backend was all Scala (Data science company so maybe it expanded from just using it for Spark).

👤 karanbhangui
Clojure(script) with re-frame and figwheel, nothing else comes even close

👤 exabrial
Microprofile or Quarkus world be my votes. Java is still the performance king, and Java 17 in the fall is going to further cement that position.

👤 fabbari
I think if I had to start new project based on Java I would definitely have Micronaut [0] on my shortlist. I have used it in small personal projects and I have to say that it was a nice change of pace compared to Spring Boot.

My understanding is that Micronaut and Spring can be used together [1].

[0] https://micronaut.io/ [1] https://micronaut-projects.github.io/micronaut-spring/latest...


👤 sarabad2021
Lucee.io all the way. It was featured here on hn awhile back. Basically dynamic ecmascript on the JVM. Great for quickly prototyping apps with. I’ve also built many highly scalable enterprise applications with it.

👤 throwaway189262
DropWizard is great. Spring Boot was based off it.

It's a nice mix of simplicity and effectiveness.

If you want performance above all else, Vert.X isn't too hard to use. But the async API's are a PITA, much like ExpressJS.


👤 pjmlp
JEE, or if you prefer Jakarta EE, as always.

If a CMS solution is required, LifeRay or Adobe Experience Manager.

Preferably with Oracle as database, and most performance critical queries written in PL/SQL.

Although I am sure this is a not welcomed solution in this side of Internet.


👤 sfifs
I'm experimenting with Ktor and Kotlin. Ktor seems really well featured with baked in co-routines based concurrency and Kotlin feels a far more sophisticated and productive as a server side language than Go or Python.

👤 varispeed
I managed to skip few years of front end development. The last time I was at it, the Go was all rage and express JS. What would you use today to be valuable on the job market?

👤 bdcravens
Lucee application server, with ColdBox framework.

👤 preordained
Clojure with usual suspects; e.g. Ring, etc.

👤 emrah
As always, the answer is, it doesn't matter.

Whichever stack gets you to build your mvp fastest, or the one you already know and enjoy, or the new shiny one you've been dying to try out, or the one your buddy challenged you to use..

They are just tools, which you pick is a matter of preference. Just pick one unless you enjoy spending your time thinking about which to pick rather than get to work and build your project


👤 5cott0
Spring/Lombok/Postgres/React - exactly the same as I would have used in 2015.

👤 homarp

👤 ajdoingnothing
Spring Boot or Quarkus.

👤 surajcm
Spring boot, Java 15+, Gradle, Tomcat (in built), Thymeleaf

👤 blntechie
Quarkus would be my choice.

👤 yamellasmallela
Step 1: Pick anything other than JVM language

👤 aristofun
Why people like suffering so much? )

Sorry for being emotional and slightly off topic, but why would you fire a cannon at sparrows?

“Today” some things changed, new more team-scalable and simple languages matured. Old one got more performant and stable (like nodejs, ruby etc).

What’s there in CRUD that you win with jvm?