Hacker News new | ask | show | jobs
by p2detar 546 days ago
Serious question - what could Spring Boot give me for POC/prototyping that Javalin or Micronaut couldn't? I really struggle to understand why most of Java shops out there have set themselves on the Boot path. Is it technology-based decision or politics?
4 comments

Boot has an "app" (err, lib) for everything. It's fully featured, and highly opinionated.

Pretty much any modern computing problem you have, Boot has you covered[1].

So while you may not have ever used a Streaming library before, if you know Boot, then the Spring Boot Streaming library will already be familiar.

[1] https://spring.io/projects/spring-boot

I’m not familiar with either of those frameworks so can’t comment on them specifically, but 10+ years ago not using spring/boot entailed glueing together a lot of disparate libraries to do things spring boot had built in. Spring boot includes pretty much everything. Plus reliability, battle tested, easy to hire people with experience using it.
Spring Data can be ridiculously productive. It is definitely in the magic category, but you can just have an interface with methods named in a specific way, and then just call that from a controller class, and you have a REST API that calls into your DB for any of the usual CRUD queries immediately. And it's not even just a hack that works on the easy case, you can annotate it with complex hand-written SQL (both db-independent, but feel free to use native queries), and easily extend them with real implementations if you need more control.
I choose Spring Boot anytime I have to create a service, just for that reason.

The eco system is a huge force multiplier, and is constantly evolving. Spring Boot simplifies that a lot by simplifying the setup to the point where you often only have to add a single dependency, and everything is configured with default configurations (which you can change if necessary of course)

Just look at all the different projects under the Spring banner: https://spring.io/projects

One example is the new Spring AI, where they have abstracted a lot of functionality and you can change providers (OpenAI, Mistral, AWS, Azure, Google) easily.

The ecosystem factor is real. I was looking at implementing the SCIM protocol [0] in our user management app, and if we were on Spring I could have just added an Apache boot-starter dependency and been done in a few days. However my company uses the Play framework and it’s going to take me weeks to implement it by hand.

[0] https://scim.cloud

If I ever found a startup I will mandate that we use Spring Boot (java/kotlin) until we grow big enough to afford the extra overhead with other frameworks. Spring Boot is truly a Get Stuff Done framework

It would be hard to convince some people of this, because "everyone knows Spring is enterprise". Unfortunately many only have experience with legacy companies, bad code or through reading old blog articles, and base their opinions on that.

It's actually something you need to have experienced yourself to recognize the possibilities.

It may sound strange, but I enjoy going through the long list of projects in the Spring web site. I almost always find something cool and is surprised at how much they can simplify complex functionality

The learning threshold is also relatively low, because they tend to use common best practices in the framework.

I’ve spoken about this before but choosingg Play and not Spring has been my companies biggest mistake. It has lead us down so many half documented custom solutions that would have just worked out of the box if we had chosen the more popular stack.

I like Kotlin, but the lack of checked exceptions really kills it for me. Exception safety is a bigger thing for me than null safety.

It‘s established patterns. Javelin or Micronaut are probably great, but not a lot of people understands how to build a real project with them. With Spring Boot you don’t even think about it.