News for hackers. Stuff that matters.
Re:Java in the Small by fiddlerwoaroof on Wednesday December 18, 2024 @11:42PM (#42458485)
I've had to maintain a couple Spring Boot apps and I absolutely cannot stand them: they pull in a whole pile of random dependencies and do weird things to your build with little explanation. Then, all the functionality involves a ton of classpath scanning and annotation-based DI that makes it hard to figure out how all the things fit together.
Re:Java in the Small by gf000 on Thursday December 19, 2024 @03:23AM (#42459507)
I mean, have you learnt the framework before attempting to do that?

Frameworks are frameworks, not libraries. You can't just start writing/understanding them - frameworks are different from libraries precisely because they call your code, not the reverse.

Re:Java in the Small by lproven on Thursday December 19, 2024 @06:24AM (#42460426)
That's a great explanation. Thanks for that.
Re:Java in the Small by fiddlerwoaroof on Thursday December 19, 2024 @04:33PM (#42465902)
Yes, the problem is exactly that the framework calls your code instead of being called by you code.
Re:Java in the Small by Alupis on Thursday December 19, 2024 @04:40PM (#42465965)
That's how all frameworks work though. This is not a criticism of Spring Boot. You are criticizing the use of a framework at all.

Some people hate to write the same basic things over and over. That's where a framework excels. Write only the glue/logic you need to make your app work.

The way you have described your experience with Spring Boot seems to imply you did not take the time to learn it at all, and therefore its' unsurprising to us you had a hard time of it.

Re:Java in the Small by fiddlerwoaroof on Thursday December 19, 2024 @07:09PM (#42467093)
Not writing the same thing over and over again is a feature of abstraction. A framework is a user-hostile way to abstract because it makes the source code opaque to developers. There's no reason why a library-based approach has to be more repetitive than frameworks.
Re:Java in the Small by gf000 on Friday December 20, 2024 @05:53AM (#42470016)
CRUD backends have well-understood requirements, in a way, a significant part of the work is done for you. You are there to customize certain parts only.

How else would you architect with this in mind? Given that literally every other framework is quite similar (RoR, PHP's solutions, etc).

There is another niche, the HTTP server libraries, but they are much more low level.

Re:Java in the Small by Alupis on Friday December 20, 2024 @01:49PM (#42473695)
Right, so you cobble together 48 different libraries, wrangle all of their configurations and stitch them all together yourself.

You do this 18 times because you have 18 different apps with similar requirements but deal with different data/endpoints/whatever.

On your 19th app you decide to standardize how you cobble together all of these libraries so that you don't have to start at ground zero every single time.

Now you've invented a framework.