5 ms·
Now we've got Spring, which in my, admittedly limited, experience does a great job of transforming what could have been compile-time errors into run-time errors
by tonyarkles 6y ago
Now we've got Spring, which in my, admittedly limited, experience does a great job of transforming what could have been compile-time errors into run-time errors.
- jacques_chester 6y agoThe wheel of karma is ever-turning, though [0],[1]. Disclosure: I work for VMware, which sponsors Spring development. [0] https://spring.io/blog/2021/03/11/announcing-spring-native-beta https://spring.io/blog/2021/03/11/announcing-spring-native-b... [1] https://github.com/spring-projects-experimental/spring-fu https://github.com/spring-projects-experimental/spring-fu
- The_rationalist 6y agoThose are nice advances but I hope that spring will one day support compile time validation of generated queries and of beans like Micronaut do.
- jacques_chester 6y agoI'm confident it'll reach that point.
- noisem4ker 6y ago...and probably well before Micronaut gets rid of its bugs, comes close to feature parity and generally matures as a framework.
- victor106 6y agoSpring native is a game changer for so many organizations using containers for startup times. There are other spring related issues you still have to deal with
- avmich 6y agoWell said :) . Spring looks so much as to show how useful ideas can be misapplied with catastrophic results. For example, liberate encouraging of dependency injections leads to multitude of interfaces which are only ever implemented once by a production code class, and maybe one more time by a test class, even though Java has all methods virtual and testing could be done without requiring the interface.
- mamon 6y ago>> Java has all methods virtual and testing could be done without requiring the interface. Not sure what you mean by that. I thought that interface/implementation divide is the way to implement virtual calls. Unless you want testing frameworks to do bytecode instrumentation.
- nitrogen 6y agoModern testing frameworks can indeed mock concrete classes, which beats the bytecode generation that Spring would be doing anyway.
- avmich 6y agoIf your interface is going to be implemented by just one class, I'd offer to skip interface - it reduces amount of code. If you still need to pass, as a parameter, a class A in order to test a class B, you can instead pass class C inherited from A, with all necessary methods overloaded. If you just create a class A in java, no interfaces involved, class A will have its methods virtual. I'm not sure what do you mean by interface/implementation divide.
- oftenwrong 6y agoIt's reasonable to provide a single implementation of an interface, if the goal is to facilitate dependency injection for that component. The problem I find with Spring is that it is designed for dependency injection at all levels of its architecture, leading it to be one of the ultimate examples of Ravioli Code. https://wiki.c2.com/?RavioliCode https://wiki.c2.com/?RavioliCode DI is a powerful concept, but Spring projects rely on DI in such a generic way that it often doesn't even make sense for your application. You have to gain intimate knowledge of the abstractions, and inject a bunch of code in a bunch of places just to make it do the very-straightforward thing you were trying to do.
- The_rationalist 6y agoJust use micronaut if compile time errors is what you want. It can even validate generated queries.
- geodel 6y agoYep. Give it a one line error description and it turn into stack trace longer than "War and Peace".
- blntechie 6y agoRunning ‘mvn install’ on even a simple Spring project with default dependencies is scary to watch on the console. So many things happen and it’s not even the verbose mode. Running ‘dotnet build’ is much more saner and one can reasonably understand what happens.
- frant-hartm 6y agoTry `npm install` then..
- specialist 6y agoSpring is a flow of control obfuscation framework.