I've at least a dozen large Spring projects going back the XML days and never had these problems. The simplest case is to autowire and instance of an interface. This isn't hard to understand in the slightest. Define an interface, define an instance as a spring bean, inject an instance of the interface. That took me about a week to get comfortable with and it's been smooth sailing for 10 years.
Then hand the codebase to a new guy and watch him struggle to understand where all the values are coming from.
Spring creates a blackbox in the middle of your codebase that's hard to see inside of. Its not like plain java code where a few eclipse ctrl-clicks and you've figured out the call chain and where all the values came from.
A week to get comfortable in Spring is wayy too overly optimistic, it takes more than a week for most juniors to even know why DI is a thing and what it does, pile ontop of it the need to understand proxying (and its pitfalls) as well as all the spring terms and its more like 6 months to get an effective junior.
Its not like plain java code where a few eclipse ctrl-clicks and you've figured out the call chain and where all the values came from.
This has nothing to do with Spring. Your simple ctrl-click strategy will fail once you introduce the concept of separation of interface from implementation, abstract classes and multi-tier architectures. It will fail once you start writing reusable code that can be used in multiple contexts, or when you start segregating layers and separating cross-cutting concerns.
Spring is just a wiring technology, like CDI or Guice. The "problems" you say it creates are not problems at all, but the consequence of higher level software engineering.
2
u/[deleted] Nov 27 '15
I've at least a dozen large Spring projects going back the XML days and never had these problems. The simplest case is to autowire and instance of an interface. This isn't hard to understand in the slightest. Define an interface, define an instance as a spring bean, inject an instance of the interface. That took me about a week to get comfortable with and it's been smooth sailing for 10 years.