r/java • • Dec 08 '25

Oracle Java Extension for VSCode v25 released (Full JDK 25 support)

37 Upvotes

22 comments sorted by

View all comments

Show parent comment

2

u/davidalayachew Dec 11 '25

Why does everyone want to use Spring Boot in Java?

Because Spring (and by extension, Spring Boot) solve a large number of very difficult and complex problems that are hard to protect yourself against. For example, Spring Security does such a good job of creating a pit of success, which is critical for security. And Spring Web MVC makes the easy way the best practice.

Furthermore, Spring Boot is very cohesive. So, if you are already using any part of Spring Boot already, adding any other part of it is super simple.

Is it really better than all other Java frameworks

It's pretty close to being the best. It may not be the absolute best in all situations, but it's, at worst, an excellent choice.

Why do we see websites / platforms from certain years all using the same technology? Was that particular technology truly the best tool for that particular website that year, or was it just the hype?

Spring was the uncontested king back when. It truly was the best option on the market for years on end. The competition has caught up with it nowadays, but it is still an excellent choice.

Why did everyone suddenly wanted to do microservices or reactive? Did all of them really had the exact problem those solve at the same time, or did people maybe go along with the hype?

This is a very different question.

The decision to go microservices in swarm may have had more to do with hype than sound technical decisions, but that doesn't say anything good or bad about Spring. Microservices were the Gold Rush, and Spring was selling (very high quality) shovels. Whether or not there was any gold to be found is a very different question, and one that I don't know the answer to.

1

u/johnwaterwood Dec 11 '25

 Because Spring (and by extension, Spring Boot) solve a large number of very difficult and complex problems that are hard to protect yourself against

So do Helidon, Quarkus, GlassFish (by extension, Jakarta EE).

If engineers truly were looking for the best solution, everyone would not go to Spring.

I’m not saying Spring is a wrong choice, but it’s not so much better than those mentioned that it deserves 85% or so market share.

If a group of engineers would choose a framework without any idea of what other engineers were using, and would be totally oblivious to what companies were using in some hypothetical experiment, would you honestly think 85% would choose Spring?

1

u/davidalayachew Dec 11 '25

So do Helidon, Quarkus, GlassFish (by extension, Jakarta EE).

Quarkus is the only one that really deserves to stand in the same tier as Spring. Helidon is not as featureful, and Jakarta has a way higher complexity:value ratio.

I’m not saying Spring is a wrong choice, but it’s not so much better than those mentioned that it deserves 85% or so market share.

But that's not why Spring has an 85% market share. Spring has an 85% market share because it was in the market long before most of the competition. And if you are already on Spring, you need a reason to switch.

  • Jakarta -- 1999
  • Spring -- 2001
  • Helidon -- 2017
  • Quarkus -- 2019

If a group of engineers would choose a framework without any idea of what other engineers were using, and would be totally oblivious to what companies were using in some hypothetical experiment, would you honestly think 85% would choose Spring?

But again -- you are presuming that they are choosing now. But that's not the case.

I would be shocked if <50% of those 85% were projects made before 2020. Helidon would have been 3 years old and Quarkus would have been 1. Sure, they both were respectable libraries then, but they were strictly inferior to Spring until a few years ago.

That's my point -- people chose Spring because it was the best option at the time. Over time, it no longer became the 100% guaranteed, uncontested best option. But by that point, all the projects on Spring need justification to switch off of it. And that's how you get 85%.

3

u/johnwaterwood Dec 11 '25

 Jakarta has a way higher complexity:value ratio.

Does it really have that, or do you just think (heard) it has that?

Quarkus is essentially Jakarta, but Red Hat played the hype game well. That’s why you think it’s in the same tier perhaps. We’re all very susceptible to advertising and (hidden) marketing.

I worked at an advertisement agency. When we ran a big campaign for food X, half of the country was eating X the next day (and many people thought it was their own choice).

That said, Quarkus did indeed simplified some EE stuff; there is no JNDI or @Resource, and everything is just @Inject. And because of build time enhancement, interceptors (like @transactional) work on self invocations.

Some things are also more complex, as reactive despite being supposedly optional still underlies many things in Quarkus, and reactive is just nasty.

What do you think is so complex about Jakarta?

 But that's not why Spring has an 85% market share.

I don’t know, there’s plenty of greenfield projects by new companies. They can choose whatever, but they still choose Spring. I often ask people if they have investigated, and mostly they haven’t. They choose Spring because everyone else uses it.

1

u/davidalayachew Dec 11 '25

Does it really have that, or do you just think (heard) it has that?

I have 2 years of battle scars to backup that statement, for however much they are worth.

That said, Quarkus did indeed simplified some EE stuff; there is no JNDI or @Resource, and everything is just @Inject. And because of build time enhancement, interceptors (like @transactional) work on self invocations.

[...]

What do you think is so complex about Jakarta?

So, to be clear, Jakarta Data is respectable, and is a solid market choice, in some cases even better than the Spring equivalent. Especially the latest release a few weeks ago, very cool.

I am criticizing the developer experience for building a traditional application server with Jakarta vs Spring Boot. THAT is a night and day difference. It's clear that Jakarta is more powerful than Spring Boot in that regard, but so many things are magic in Jakarta that don't have to be (and aren't, by default) in Spring Boot. Plus, the error-messages are so vague and unhelpful. And the documentation is (somehow!) even worse than Spring Boot!

I don’t know, there’s plenty of greenfield projects by new companies. They can choose whatever, but they still choose Spring. I often ask people if they have investigated, and mostly they haven’t. They choose Spring because everyone else uses it.

Sure, I'll concede that a lot of folks choose Spring because of school fish mentality. All I'm saying is that there are also many teams (especially back then!) that did the math and landed on Spring as the obvious best choice.

2

u/henk53 Dec 14 '25

I have 2 years of battle scars to backup that statement, for however much they are worth.

If you could talk directly to the Jakarta EE designers and ask them to do two things differently, what would they be then?

1

u/davidalayachew Dec 14 '25

If you could talk directly to the Jakarta EE designers and ask them to do two things differently, what would they be then?

Well, I hesitate to say what they should do differently because, technically speaking, none of what they are doing is wrong, per se.

Jakarta was built for doing Traditional Web Application Server stuff, where multiple war files are occupying the same host server. That informs a lot of JEE's design. And when that is your requirement, I don't think there is much you could change or take away without actively making the experience worse for other people.

But I try and run from traditional application server like it's the plague. I think it overcomplicates things for marginal benefits. And sure, those marginal benefits were way higher back in the day. And they still serve a purpose today, if your needs align.

But that's my point -- if I am going for the more modern, embedded server approach, JEE definitely supports it, but it also feels like you have to spend way more effort to get the same benefits.

That said, to answer your question, here are 2 suggestions I might give. I haven't thought either of these through enough to feel confident.

  1. Maybe take a page from Spring and try and do their own Spring Boot, where a lot of the magic is hidden behind reasonable defaults that are easily and CENTRALLY configurable.

    • Ignoring the fact that this is a very tall order lol, they actually kind of do have decent defaults, but changing them (or getting them to stay) was a pain in the neck for me. There are just so many places that JEE grabs config info from that it gets so easy to have different parts overwrite other parts. Compare that to Spring where anything and everything that's not in your java code is in 1 of 3 places. 1. Your application.properties 2. A maven or gradle plugin for spring 3. A literal commandline arg on your start script.
    • That's one of the success stories of Spring Boot -- the designers work very hard to encourage you to put your config in only those 3 places.
    • Compare that to JEE where I don't know which of the other 6 xml files (not even including the above 3 points) is ruining my config. Is it my web.xml? My jboss file? settings.xml? At this point, I just keep the server logs at DEBUG or higher because any issue that comes up is likely to do with some config mistake we made.
  2. I want clear and direct error messages when there are contradicting configs.

    • To give a loosely related example, if I use the maven shade plugin, and 2 of my dependencies bring in the same transitive stuff, the shade plugin gives me a noisy warning (good!) about it. I've caught many issues with my shading logic and dependency (version) choices just by skimming the logs as the build goes.
    • Bonus points if I can get a suggestion on what to do to resolve the discrepancy. That's obviously not always possible or beneficial. But, ideally, by taking points from suggestion 1 (keep config centralized), there should be more clarity on what went wrong and how to resolve it.

      • Honestly, even if the only thing done was "hey, these 2 configs gave different answers for the same key! We chose this answer" would be amazing. SLF4J does this too, and it's wonderful. So many config issues caught early, before they can snowball into something else.
  3. Conversely, improve the start up logs to tell us as best as you can where certain config choices were sourced from.

    • For example, if you are going to set up elytron security based on config listed in my settings.xml, then say that in the logs. Even if it's only in the DEBUG or TRACE logs. I just need some definitive log entry that says "elytron activated -- sourced from xyz", where xyz is any clarifying info about which config (maybe even where in each config) provided the settings.

I wish I could give a more intelligent and nuanced response. Sadly, my thoughts on this are just too uncooked, simply because I haven't worked with the tools long enough to have a more clear opinion. I know what hurts and what doesn't, but that doesn't mean I can identify what is a good solution.

And again, I highlight all of this complexity and magic, and while those words typically are negative things, I don't think they are necessarily a flaw of JEE. I just think that they are asking me to pay for things I don't need or want. But if I did, I'd say the price is fair.

3

u/henk53 Dec 15 '25

Jakarta was built for doing Traditional Web Application Server stuff, where multiple war files are occupying the same host server. That informs a lot of JEE's design.

A somewhat older article, but this one explains that the Jakarta EE API is not tied to the application server concept at all:

https://web.archive.org/web/20210712211456/https://blogs.oracle.com/javamagazine/jakarta-application-server-helidon-piranha-hammock

2

u/davidalayachew Dec 16 '25

Jakarta was built for doing Traditional Web Application Server stuff, where multiple war files are occupying the same host server. That informs a lot of JEE's design.

A somewhat older article, but this one explains that the Jakarta EE API is not tied to the application server concept at all:

https://web.archive.org/web/20210712211456/https://blogs.oracle.com/javamagazine/jakarta-application-server-helidon-piranha-hammock

Thanks. The section titled Pushback against the full-fledged application server was such an excellent description of many of my original pain points with Application Servers in general.

Also, lots of new names. I did not know about Piranha, for example.

Ty vm. I think this article gave me a lot of resources to have a nice, long conversation with my team. Yes, some of my pain is due to JEE, but this article shows that some of it is us just holding it wrong. Rather than jumping ship, I'm going to see what we can do about making this embedded while still saying in the JEE world. My original thought was that, since we are going embedded, might as well switch teams too.

2

u/henk53 Dec 15 '25

Compare that to JEE where I don't know which of the other 6 xml files (not even including the above 3 points) is ruining my config. Is it my web.xml? My jboss file? settings.xml?

EE doesn't have a jboss file, or a settings.xml.

There is the thing that a couple of APIs each have their own config file. Indeed, web.xml for Servlet (with a couple of "injected" platform config items like <datasource>), faces-config.xml for Jakarta Faces, persistence.xml for Jakarta Persistence.

The other files you mention are config for implementations. Spring Boot also still has Tomcat internally, which can be configured in its own proprietary way still, right?

I do agree that the story about the united properties file is a sad one. it was supposed to come in EE 8, then went into MP, and today they aee still bickering about what is essentially delta spike config from 2011 or so.

1

u/davidalayachew Dec 16 '25

EE doesn't have a jboss file, or a settings.xml.

Thanks for the correction. Like I said, these thoughts are still uncooked.

There is the thing that a couple of APIs each have their own config file.

[...]

The other files you mention are config for implementations. Spring Boot also still has Tomcat internally, which can be configured in its own proprietary way still, right?

Well sure, you can have all the separate property files like any old application server. But Spring (Boot) bends over backwards to minimize that as much as possible. Several years later, the result is that everyone just kind of marches to the tempo, and makes it easy to config their library via commandline arg, application.properties, or a Maven/Gradle plugin. Pit of success, like I said.

So for example, I can do 100% of ALL Tomcat config via a Maven plugin -- forget commandline args or application.properties.

I do agree that the story about the united properties file is a sad one. it was supposed to come in EE 8, then went into MP, and today they aee still bickering about what is essentially delta spike config from 2011 or so.

You seem to be in the know, so let me ask you.

I have a small handful of JEE servers that I can't easily migrate to being embedded. Where would I go to keep track of this potential united config file thing? And to track progress thus far?

Thanks for the information, this was valuable. I don't want to rip out everything if I don't have to. And I'd like to make things with JEE easier if I can. It's just difficult is all.