Click here to Skip to main content
15,887,596 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: Have a nice music week end, Aphrodite's Child Pin
Greg Utas10-Dec-22 5:48
professionalGreg Utas10-Dec-22 5:48 
GeneralTechnical disussion about DI/DI Containers... Pin
0x01AA10-Dec-22 4:39
mve0x01AA10-Dec-22 4:39 
GeneralRe: Technical disussion about DI/DI Containers... Pin
Gary R. Wheeler10-Dec-22 5:56
Gary R. Wheeler10-Dec-22 5:56 
GeneralRe: Technical disussion about DI/DI Containers... Pin
0x01AA10-Dec-22 6:30
mve0x01AA10-Dec-22 6:30 
GeneralRe: Technical disussion about DI/DI Containers... Pin
Gerry Schmitz10-Dec-22 5:59
mveGerry Schmitz10-Dec-22 5:59 
GeneralRe: Technical disussion about DI/DI Containers... Pin
0x01AA10-Dec-22 6:47
mve0x01AA10-Dec-22 6:47 
GeneralRe: Technical disussion about DI/DI Containers... Pin
Richard Andrew x6410-Dec-22 7:03
professionalRichard Andrew x6410-Dec-22 7:03 
GeneralRe: Technical disussion about DI/DI Containers... Pin
Marc Clifton10-Dec-22 15:28
mvaMarc Clifton10-Dec-22 15:28 
DI is overrated. Programming "to" an interface is fine when you have a real use case to abstract different implementations that you may want to switch between when service A (or controller A) needs to support service implementations S1, S2, and S3. For example, you might have several document store services, one for AWS buckets, one for your own document server, one for storing documents as blobs in a DB and different ones get instantiated on the fly depending on other factors.

That said, one can code an application into interface hell, where everything has an interface and almost nothing needs an interface because there's only ever going to be one concrete implementation of the service.

Happily, in .NET Core for example, the DI engine doesn't require interfaces - you can specify "this service is implemented by its concrete type" rather than always having to say "this service implements this interface."

I have literally chucked out thousands of lines of interface code (I pity the programmer that wrote all that crap -- it wasn't me) because they were glommed onto the "DI must be done with interfaces" not realizing they were making pointless work for themselves because the never ever would have multiple concrete implementations for the interface abstraction.

Know when to use an interface rather than always use an interface. Much like, um...

GeneralRe: Technical disussion about DI/DI Containers... Pin
Daniel Pfeffer10-Dec-22 19:34
professionalDaniel Pfeffer10-Dec-22 19:34 
GeneralRe: Technical disussion about DI/DI Containers... Pin
0x01AA11-Dec-22 2:20
mve0x01AA11-Dec-22 2:20 
Generalworldle 322 Pin
jmaida9-Dec-22 15:39
jmaida9-Dec-22 15:39 
GeneralWordle 539 Pin
StarNamer@work9-Dec-22 15:06
professionalStarNamer@work9-Dec-22 15:06 
GeneralRe: Wordle 539 Pin
Amarnath S9-Dec-22 17:09
professionalAmarnath S9-Dec-22 17:09 
GeneralRe: Wordle 539 Pin
OriginalGriff9-Dec-22 19:52
mveOriginalGriff9-Dec-22 19:52 
GeneralRe: Wordle 539 Pin
Sandeep Mewara9-Dec-22 20:24
mveSandeep Mewara9-Dec-22 20:24 
GeneralRe: Wordle 539 Pin
pkfox9-Dec-22 21:46
professionalpkfox9-Dec-22 21:46 
GeneralRe: Wordle 539 Pin
Sander Rossel10-Dec-22 0:57
professionalSander Rossel10-Dec-22 0:57 
GeneralRe: Wordle 539 Pin
Cp-Coder10-Dec-22 2:06
Cp-Coder10-Dec-22 2:06 
GeneralRe: Wordle 539 3/6 Pin
jmaida10-Dec-22 7:56
jmaida10-Dec-22 7:56 
GeneralI'm back Pin
Mike Hankey9-Dec-22 11:20
mveMike Hankey9-Dec-22 11:20 
GeneralRe: I'm back Pin
Ron Anders9-Dec-22 12:14
Ron Anders9-Dec-22 12:14 
QuestionRe: I'm back Pin
fgs19639-Dec-22 14:07
fgs19639-Dec-22 14:07 
AnswerRe: I'm back Pin
Mike Hankey9-Dec-22 14:14
mveMike Hankey9-Dec-22 14:14 
GeneralRe: I'm back Pin
fgs19639-Dec-22 14:16
fgs19639-Dec-22 14:16 
GeneralRe: I'm back Pin
Slacker0079-Dec-22 14:49
professionalSlacker0079-Dec-22 14:49 

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.