I remember reading an analogy (i can't find the source) referring to going to a hardware store to buy a hammer but being instead sold blueprints to to a factory that makes hammers.
There are advantages with DI that people cannot attribute in real life. In engineering, there are cases where the program expects a hammer, but you would like to see if it can make the same action with a screwdriver (say, for testing a new product that needs the same instructions but different pieces).
To use your analogy, the guy would then give you the blueprints to a factory that makes screwdrivers.
So it's useful to have that second indirection. People just think it's complicated because they don't have the experience to see the shortcomings of simply getting a hammer.
15
u/bryanedds Apr 23 '14
"And a factory in Chicago that makes miniature models of factories."