Hacker News new | ask | show | jobs
by provolone 2539 days ago
Just avoid bloated frameworks and your problem is solved.
2 comments

This is not a balanced argument. Spring offers a lot of helpful things and can increase productivity. But it also has it's downsides like when something is not working because all the magic behind the scenes, making you more productive normally, just doesn't work in your case.

If I look at Go code, for example, I can hardly bear all the tedious repetition and dumb code! There is hardly any magic in Go, but the downside is, that you have to write every `filter`, `map` and `reduce` by hand.

That's fine. Use what works for you. There's more than one way to skin a cat.

It isn't particularly balanced to assume that the spring way is the only way to do things because magicians...

If the OP has that problem with spring then he can use the base servlet API or another solution.

I do exactly same as you described. Use plain servlets with embedded tomcat in application. It all works very well for me.

But now I have to support multiple Spring boot projects. I can't help noticing one thing common in these projects that it is about 10% functionality and 90% of Spring turd nuggets strewn all over project repos.

Feels like today there are some libraries that are only offered for Spring. Other than that I have been happy to do as you do with Jetty.

I'll add that autoconfiguration is a symptom, not a solution.

Considered removing spring where I work to speed up startup times. Found the biggest bang for the buck was rewriting a bean factory to parallelize singleton preinstantion.

That's what I thought the optimal route was. That's how much we benefit from the strong spring ecosystem.

(It was a little less of a pain than you might think because I didn't have to support all spring features, just the ones we use, which happen to mostly not be features used during singletons preinstantion)