this post was submitted on 04 Apr 2026
204 points (99.5% liked)

Interesting Shares

2637 readers
93 users here now

Fascinating articles, captivating images, satisfying videos, interesting projects, stunning research and more.

Share something you find incredibly interesting.


Prefix must be included in the title!


Mandatory prefixes for posts

It helps to see at glance what post is about and certain clients also offer filters that make prefixes searchable/filterable.

Note: Photon (m.lemmy.zip) frontend used for links above.


Icon attribution


If someone is interested in moderating this community, message @brikox@lemmy.zip.

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] chunkystyles@sopuli.xyz 3 points 1 day ago (1 children)

Being mandated to use Spring is stupid. But Spring at least is great.

[–] TootSweet@lemmy.world 2 points 19 hours ago (1 children)

Honestly, hard disagree. It makes building a skeleton application really quick, but it's so magical. As the guy who people come to when they've been banging their head against a problem (because we bumped the version on one random serialization library and now the org.springframework.core.initializer.GenericSecurityPolicyContextFactoryConfigurationProviderServiceScannerImpl doesn't work, so we're faced with days more of Jar hell) for days, I'd much rather we just use Servlets directly without involving Spring at all. (And god help us if we ever attempt to upgrade our Java version.)

Servlets was supposed to make everything easier. It 100% has its warts. (Servlet containers are pretty heavy. JSPs are terrible in every way. One of the things I hate most about it is that there's no way to render a JSP to a string (for instance, for rendering email bodies) short of making a request back to a dummy endpoint on the same application that only does rendering.) But it's comparatively very clean and explicit, avoids 100 layers of magic, keeps your list of dependencies small, it's very obvious how you'd do any particular thing with it, etc.

But people decided it wasn't good enough and built Spring on top of Servlets to supposedly make things easier. I have to imagine it was built by the sort of people who would "fix" their cracked foundation by adding a new story to their house. If anything isn't acting right with Spring, you have to understand both Spring and Servlets to be able to fix it. And as I've probably mentioned a few times, Spring is suuuuuuper magical. And integrating other third-party things with Spring involves voodoo every time.

And then everything was good! Just kidding. Everybody agreed that wasn't good enough either. So did they fix Spring? No. They built another story on top of the failing foundation. Spring Boot. Which adds still more layers of magic on top. I'm no fan of XML, but I'd rather deal with a web.xml file than try to figure out what the hell any particular Spring annotation is actually doing (because it isn't working) any day.

Aside from that, you look for fixes online, and you get a Stack Overflow post with 8 completely different answers and just have to hope one is right. So I've learned not to even search for answers on places like Stack Overflow. Typically, I'll go straight to the Spring source code when people come to me with issues -- because they know I'm the only one brave enough to embark on such a spelunking mission. Spring isn't really intended to be understood. It's meant for people to throw... let's say spaghetti... at the wall until something happens to stick.

Bah! You got me on a rant. Lol. I'm not really familiar with any other Java frameworks. But last time I worked in Django, I loved it. It's not magic and it is intended to be understood deeply. (Hell. I've written ORMs in Java inspired by Django's ORM because it was so understandable and elegant.)

Anyway. In short, my experience with Spring has been exactly the opposite of yours, apparently. I think the context is one of the more innocuous parts of Spring, and I don't think it's that much of a concession to use that.

Maybe I hate Spring because I'm the person that people come to when it's broken, so every time I have to think about it, it's because there's some headache that it's causing. But then again, maybe everyone else on my team would hate Spring too if they didn't have me to externalize all the issues it causes onto. Lol.

[–] chunkystyles@sopuli.xyz 0 points 13 hours ago (1 children)

I mean, most of your issues come from not knowing how to use Spring. And I'm not dogging on you for that. It's just kinda how it is.

If you aren't familiar with Spring it can be extremely confusing why something isn't working. And it feels like it does things by "voodoo" in your words. But it's not. If you understand it and are familiar with it, you can make it do whatever you want.

JSPs are terrible, though. And I don't know about relative "heaviness" of servlets.

[–] TootSweet@lemmy.world 3 points 13 hours ago

People come to me when they can't make it work because I'm the guy with 20 years experience in Spring.

And Spring MVC runs on top of Servlets. Saying you don't know enough about Servlets to know whether it's heavier than Spring or not is like saying you don't know enough about Javascript to know whether it's heavier or lighter than jQuery.