3 ms·
I have to use Spring at work in a pretty large Enterprise Java environment, and our setup is not as you describe. Despite Spring's message of conformity, it do
by sirsean 17y ago
I have to use Spring at work in a pretty large Enterprise Java environment, and our setup is not as you describe.
Despite Spring's message of conformity, it doesn't actually force you to program everything as singletons and beans.
- thomanil 17y agoI concur. I also use Spring at my dayjob, without the problems the OP describes. Spring is really useful for setting up the underlying infrastructure/plumbing/cross cutting concerns of a system - however, you don't have to use it for all your domain logic too. Don't drink the dependency injection cool-aid. :)
- prodigal_erik 17y agoI like dependency injection for wiring together configured singletons (such as factories). What I don't like is a trivial constructor and then injection via setters. Constructors should produce objects ready for use, and Spring tolerates doing it that way (though it seems to prefer setters).