Talk:Dependency injection/Archives/2016/October
Appearance
This is an archive of past discussions about Dependency injection. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Dumb it down
I came here after hearing about DI for the first time today. I understand all the principles involved, but the intro depends on so many buzzwords that I'm still in the dark. I finally found a Stack Overflow article that puts it much more clearly... rather than your class creating instances of other classes, DI "makes that someone else's problem."
If I understand correctly, DI basically means: rather than using "new" to create a child object in your class, outside code creates the child object for you, then passes it in through the constructor or through a mutator, a set method or a Property assignment.
Is this correct? If so, can we incorporate something like this into the opening section? -- TomXP411[Talk] 00:09, 25 August 2016 (UTC)
- @TomXP411: Appreciate the feed back. You'll find a new second paragraph that makes this point. Galhalee (talk) 06:46, 26 October 2016 (UTC)