3 ms·
Agreed. Modern Spring brags about not requiring pages of external XML files like it did in the old days. But plain constructors is still an improvement on bot
by mrkeen 1y ago
Agreed. Modern Spring brags about not requiring pages of external XML files like it did in the old days. But plain constructors is still an improvement on both.
- pshirshov 1y agoConfigurable apps (see "axis" and "role" concepts in distage) are prohibitevely hard to setup and maintain, dual test with sound opt-in memoization are, probably, practically impossible.
- tyleo 1y agoSo I looked at the examples and it just seems like a lot for a little. https://izumi.7mind.io/distage/basics.html#activation-axis https://izumi.7mind.io/distage/basics.html#activation-axis I feel like all you need there is a ctor param that takes a greeter and pass in whichever you want. Those params can be cached as necessary or part of larger config POD objects if they are often passed with other dependencies.
- pshirshov 1y agoNo, you need much more because you want to switch multiple implementations at once, you want to avoid logical conflicts and you want to avoid specifying flags which are redundant in a particular configuration. Also you want to be able to make sure that your application will start without actually running it. In Scala implementation we do it at compile time for all the possible paths.
- oweiler 1y agoIt just gets rid of the boilerplate. Never had a problem with ctor injection in Spring.