Click here to Skip to main content
15,895,142 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Dependency Injection/IoC Pin
Marc Clifton10-Oct-18 9:10
mvaMarc Clifton10-Oct-18 9:10 
GeneralRe: Dependency Injection/IoC Pin
Slacker00710-Oct-18 9:42
professionalSlacker00710-Oct-18 9:42 
GeneralRe: Dependency Injection/IoC Pin
Marc Clifton11-Oct-18 4:01
mvaMarc Clifton11-Oct-18 4:01 
GeneralRe: Dependency Injection/IoC Pin
TNCaver11-Oct-18 4:07
TNCaver11-Oct-18 4:07 
GeneralRe: Dependency Injection/IoC Pin
TNCaver11-Oct-18 4:09
TNCaver11-Oct-18 4:09 
GeneralRe: Dependency Injection/IoC Pin
Slacker00711-Oct-18 5:44
professionalSlacker00711-Oct-18 5:44 
GeneralRe: Dependency Injection/IoC Pin
Jon McKee10-Oct-18 10:26
professionalJon McKee10-Oct-18 10:26 
GeneralRe: Dependency Injection/IoC Pin
Matthew Dennis10-Oct-18 12:30
sysadminMatthew Dennis10-Oct-18 12:30 
Where the coupling is reduced is the dependencies of the interfaces/classes that are being injected.

If your class needs a IWidgetService to run, you don't have to know that the implementation IWidgetService requires an instance of the WonderfulApiClient class, a WhatchamacallitRepository, and a AppConfiguration object, or any or their dependencies. You don't have to worry about the construction.

Furthermore, if the implementation of IWidgetService changes to require different dependencies, your code that uses the IWidgetService doesn't have to change, unless you've changed the API for the IWidgetService.

This keeps minor changes in your code from requiring a cascading set of changes to the users of your classes.
"Time flies like an arrow. Fruit flies like a banana."

GeneralRe: Dependency Injection/IoC Pin
GuyThiebaut10-Oct-18 20:35
professionalGuyThiebaut10-Oct-18 20:35 
GeneralRe: Dependency Injection/IoC Pin
englebart11-Oct-18 4:33
professionalenglebart11-Oct-18 4:33 
GeneralRe: Dependency Injection/IoC Pin
Steve Naidamast11-Oct-18 5:46
professionalSteve Naidamast11-Oct-18 5:46 
GeneralRe: Dependency Injection/IoC Pin
RandyBuchholz12-Oct-18 12:34
RandyBuchholz12-Oct-18 12:34 
GeneralThought of the Day Pin
OriginalGriff10-Oct-18 5:00
mveOriginalGriff10-Oct-18 5:00 
GeneralRe: Thought of the Day Pin
Johnny J.10-Oct-18 5:05
professionalJohnny J.10-Oct-18 5:05 
GeneralRe: Thought of the Day Pin
W Balboos, GHB10-Oct-18 5:21
W Balboos, GHB10-Oct-18 5:21 
GeneralRe: Thought of the Day Pin
megaadam10-Oct-18 5:32
professionalmegaadam10-Oct-18 5:32 
GeneralRe: Thought of the Day Pin
PIEBALDconsult10-Oct-18 5:35
mvePIEBALDconsult10-Oct-18 5:35 
GeneralRe: Thought of the Day Pin
DRHuff10-Oct-18 7:49
DRHuff10-Oct-18 7:49 
QuestionCan you actually HEAR the blood running through your veins... Pin
Johnny J.10-Oct-18 3:52
professionalJohnny J.10-Oct-18 3:52 
AnswerRe: Can you actually HEAR the blood running through your veins... Pin
Kschuler10-Oct-18 4:02
Kschuler10-Oct-18 4:02 
GeneralRe: Can you actually HEAR the blood running through your veins... Pin
Johnny J.10-Oct-18 4:03
professionalJohnny J.10-Oct-18 4:03 
AnswerRe: Can you actually HEAR the blood running through your veins... Pin
W Balboos, GHB10-Oct-18 4:12
W Balboos, GHB10-Oct-18 4:12 
GeneralRe: Can you actually HEAR the blood running through your veins... Pin
Johnny J.10-Oct-18 4:14
professionalJohnny J.10-Oct-18 4:14 
AnswerRe: Can you actually HEAR the blood running through your veins... Pin
theoldfool10-Oct-18 4:25
professionaltheoldfool10-Oct-18 4:25 
GeneralRe: Can you actually HEAR the blood running through your veins... Pin
Nelek10-Oct-18 8:58
protectorNelek10-Oct-18 8:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.