3 ms·
People are critical of Spring because they have seen it in production and in practical projects. And fall in the naive trap that somehow the tools and the libra
by throwaway4good 6y ago
People are critical of Spring because they have seen it in production and in practical projects. And fall in the naive trap that somehow the tools and the libraries are the reasons why a real-life software project is messy.
However Spring is something that has stood the test of time and is used in thousands of actual projects. And Spring itself emerge out of practical software development with plenty of competing alternatives (Guice, classic J2EE plus many others).
The mentioned alternatives in article: Micronaut and Quarkus are not much beyound the demo state, and frankly based on some questionable ideas: Compile-time dependency injection and idea of "cloud native" - that somehow things run better in the cloud if they are compiled into a binary.
- zaphar 6y agoI'm not critical of spring because real life software projects are messy. I'm critical because I rarely if ever do greenfield development and when I'm debugging a production exception caused by something that Java's type system was perfectly capable of treating as a compile time error that is suddenly a runtime error I'm a little bit sad. And the sheer frequency that I encounter them indicates that just getting more disciplined developers isn't really a solution here.
- selfhoster11 6y agoThe real solution is to bite the bullet and build Spring's features into Java. Make as many failures as possible detectable during compilation, and go back to hard typing.
- diroussel 6y agoMicronaut gives you that. Compile time validation of your bean wiring.
- throwaway4good 6y agoOr maybe if you just want to hardwire your dependencies, you shouldn't use dependency injection.
- blandflakes 6y agoI guess at the end of the day I just don't feel like I need Spring's features.
- thomascgalvin 6y agoThe number of time's I've seen an error that amounts to `this instance of Foo should have been a FooBar, not a FooBatz` is really depressing.
- specialist 6y agoSpring is a flow of control obfuscation framework. Dependency Injection is for people who reject the clarity of composition.