4 ms·
How is that the modern part? Beans have been around for decades! Also, there are very small libs for java, you don’t have to create a spring/JEE app.
by kaba0 6y ago
How is that the modern part? Beans have been around for decades!
Also, there are very small libs for java, you don’t have to create a spring/JEE app.
- mrkeen 6y agoExactly! I hated my time with Spring. Compile-time bugs became runtime bugs (Cannot startup one bean because cannot find other beans). Startup was slow (looking for all the beans!). Solved problems like null-checking constructors and 'final'ing all variables became unsolved once you needed to leave them nullable/mutable for Spring to update them post-constructor. Testing a single class became slower and flakier when you needed to spin up the IOC to test - because it would start building config for all the other classes too. Keep in mind, Spring is already touting itself as modern. But along comes Micronaut[1] with a new set of promises: "...monumental leap in startup time" "Keeps your startup time and memory footprint low by doing the heavy lifting up-front" "Easily spin up servers and clients in your unit tests and run them instantaneously" Which is EXACTLY what I want in a framework. Having built two greenfield Micronaut services at work, as well as maintaining a few others, I can say it's bullshit. All the stuff I listed about Spring above is still true of Micronaut. > Also, there are very small libs for java, you don’t have to create a spring/JEE app. I like https://sparkjava.com/ https://sparkjava.com/ but I'm never going to be working with colleagues who choose it over Spring/Micronaut. [1] https://micronaut.io/ https://micronaut.io/