HACKER Q&A
📣 philonoist

What web framework for Java worked for you and why?


What web framework for Java worked for you and why?


  👤 karmakaze Accepted Answer ✓
Had a Spring/Boot app that had too slow startup times. Used SparkJava but it was too bare-bones.

Switched to Javalin with JDBI and it's pretty good.


👤 exabrial
We are 100% convinced that if you want to save time on development, you need to be using a component based framework for internal applications, where exact looks aren’t as important as functionality. PrimeFaces provides an incredible amount of components.

The other indispensable technology is CDI. This dependency injection specifications is very minimal and allows you to do perfect composition with your code, and makes mock testing with Mockito a breeze.

Quarkus is awesome, but it can’t run PrimeFaces directly. This would be best the best back, and if you wanted to write an SPA.

Another option is TomEE, which can run PrimeFaces, but it’s quirky. This would be best if you want to write a full stack application.

Spring/ThymeLeaf is quite good but is not a component framework. This is sort of in between and follows the MVC pattern.

There are so many choices compared to other languages and Java is faster than everything else out of the box.


👤 reactor
Quarkus

Among others, hot-reload (in dev mode), low memory footprint, fast start, sane error messages (compared to Spring) are something that attracted us.


👤 PaulHoule
JAX-RS

It's super-easy to use for writing JSON back ends, just like Sinatra.

You can add a template engine like Freemarker to output HTML also.


👤 approxim8ion
Jersey and SpringBoot have both been quite decent for me.