Hacker News new | ask | show | jobs
by cnity 1304 days ago
By far my least favourite thing about the Java web ecosystem is how weirdly obscured the bootstrapping process for starting processes is. So much of how your application starts is determined by XML files and DI frameworks that I often have no idea (or am sometimes not even exposed to) where the `main` function is.
2 comments

I’m only assuming, but I guess your last experience with Java is a bit dated, XML configurations have been largely replaced.

And then what we are left with is a huge, old project vs some new microservice, which would be an unfair comparison in any language

You're totally right. I'm sure things are better now in modern Java and adjacent spheres like Kotlin.
Caring about the main function in a framework-ey app generally makes as much sense as caring about the x86 initial boot code when launching mspaint.exe
Not for newcomers to the codebase. Approaching an application that is forced to make the entire application clear as day (as in Go) is so much easier than such Java codebases because I can just read the code and see what it does. This is just my experience though. The Java codebases are always fine as long as I have read several pages of documentation first, which I've learned to do for those cases.
I've seen devs write caches that were shared between customers because they didn't understand the lifecycle of Spring Autowired dependencies.

Understanding how the framework wires things together is important.