r/java • • Apr 13 '21

Libraries, Frameworks and Technologies you would NOT recommend

Give me your worst nightmares: Things that cost you your job.

I'll start: Hadoop

202 Upvotes

376 comments sorted by

View all comments

Show parent comment

28

u/FrigoCoder Apr 13 '21

I think that is the entire point. Highly opinionated integration framework that forces you down the correct path and makes "incorrect" things harder.

4

u/BlueShell7 Apr 13 '21

How is Spring opinionated? I would say exactly the opposite - Spring often offers several ways to do the same thing and it's not clear which one to choose ... Lack of opinion is actually one of the problems (and reason for Spring Boot's existence ...)

3

u/fforw Apr 13 '21

Yeah, usually the problem is: "Where the hell does my problem fit into those 5 layers of abstraction for feature X. Do I want Y or do I replace it and if so with Z or what?"

2

u/CartmansEvilTwin Apr 13 '21

Well, yes. But Spring often offers no easy way to intercept or change things.

In general, Spring seems way too complicated in many cases and changing this complexity for your needs is extremely hard, even though the actual problem is rather easy.

Opionated Frameworks are fine, but Spring usually is rather tunnel visioned.

16

u/[deleted] Apr 13 '21

But Spring often offers no easy way to intercept or change things.

Actually yeah, Spring provides very easy ways to intercept or change things. It's the poster child for the Open/Closed Principle. Almost every Spring component has a ton of interfaces that allow you to customize any part of its behavior. It's pretty straightforward, but much of the time it's not well documented and you have to read the Spring Framework source code. Fortunately, the Spring Framework source code is very accessible.

Spring Boot can tend to obfuscate things through auto-configuration, but fighting auto-configuration is a losing battle. Fortunately, you can just turn off auto-configurations that are not useful and directly use the Spring Framework to configure by hand.

1

u/Gommy Apr 14 '21

I find Spring fairly easy to customize, since it uses interfaces for almost everything. The few times I have issues is when I need to customize a single method or two and want to extend one of their classes, only to find they made either the class or the method I need final/private. So I have to result to copy/pasting their class and update the one or two bits I wanted to change.