Post AbKMXLkavYxwCLIrOS by steinchen@det.social
(DIR) More posts by steinchen@det.social
(DIR) Post #AbK83qAnqy3CVTb3dw by alexelcu@social.alexn.org
2023-10-31T08:35:00Z
0 likes, 0 repeats
Asking for advice — for server-side #Java projects, what would be a reasonable, modern stack that prefers compile-time constructs (no abstract classes + annotations crap)?I'd take Spring, too, but only if clear documentation is available on how to avoid the annotations scourge.
(DIR) Post #AbKGLR58gF4bX6qfEO by c_chep@piaille.fr
2023-10-31T10:07:48Z
0 likes, 0 repeats
@alexelcu have you considered Quarkus?
(DIR) Post #AbKGbFtM3JXXSdsbYm by alexelcu@social.alexn.org
2023-10-31T10:10:37Z
0 likes, 0 repeats
@c_chep I did, and it's precisely what I want to avoid. The documentation leaves something to be desired, as it left me scared and in a complaining mood 😃https://alexn.org/blog/2022/09/19/java-cultural-problem/It does have the virtue that it's compatible with GraalVM's native-image out of the box, so at least it has that going for it.
(DIR) Post #AbKHVsYVUM2Rai820u by c_chep@piaille.fr
2023-10-31T10:20:54Z
0 likes, 0 repeats
@alexelcu fair :)
(DIR) Post #AbKHgCyWQL7nojDqPw by ghost_letters@fosstodon.org
2023-10-31T10:22:46Z
0 likes, 0 repeats
@alexelcu You can take a look at https://helidon.io/docs/v4/#/about/introductionIt provides both modes - magic and plain :blobcatfingergun:
(DIR) Post #AbKHiHqVHmMPVDSlKS by steinchen@det.social
2023-10-31T10:23:10Z
0 likes, 0 repeats
@alexelcu Not sure why annotations are crap, as most modern JVM frameworks are based on it and most of them are standardized nowadays.The only backend framework I can think of is ktor: Https://ktor.io/
(DIR) Post #AbKHqKicULYEjGc0oq by alexelcu@social.alexn.org
2023-10-31T10:24:37Z
0 likes, 0 repeats
@ghost_letters Helidon is a framework that I wanted to look at, especially after v4 👍
(DIR) Post #AbKHvab6sXFPQNbcNE by cluelessjoe@mamot.fr
2023-10-31T10:25:32Z
0 likes, 0 repeats
@alexelcu good luck & let us know the outcome: feels undoable right now in java land :'( so far what i did a few times: hexagonal archi so domain code out of annotations/spring, Jooq for db (no annotation madness)for domain code, using kotlin & arrow-kt (the smart constructor pattern is close from your toot on F#): https://arrow-kt.io/learn/typed-errors/validation/#smart-constructorsbut no luck above (REST & http server basically)
(DIR) Post #AbKI9tbT0pZaQLavZo by alexelcu@social.alexn.org
2023-10-31T10:28:09Z
0 likes, 0 repeats
@steinchen Ktor is nice, I tried it, but it's not usable in Java.Annotations being a complete turn-off for me may be a topic for another day, but the TLDR is that annotations get evaluated at runtime (or via build plugins), being “magic” that can't be inspected or type-checked. This leads to brittle code, in an otherwise static language, for little gain. Standardization doesn't matter, as standardized crap is still crap.Just a personal preference, other people like JavaScript or Ruby, too.
(DIR) Post #AbKMHi5I7hAEpdWgz2 by c_chep@piaille.fr
2023-10-31T11:14:21Z
0 likes, 0 repeats
@alexelcu oh I had missed that article.And I endorse it ❤️
(DIR) Post #AbKMXLkavYxwCLIrOS by steinchen@det.social
2023-10-31T11:17:11Z
0 likes, 0 repeats
@alexelcu That's why you do TDD. You add a REST controller annotation and a test that your endpoint is really exposed.I doubt that Java is the right language for you if you object annotations as many are already defined in the core JDK itself.
(DIR) Post #AbKNdwJhzHW9IYQwS0 by keir@mastodon.scot
2023-10-31T11:29:35Z
0 likes, 0 repeats
@alexelcu Armeria looks nice, by the Netty guy so presumably performant