News for hackers. Stuff that matters.
Re:Your DI framework is killing your code by throwawaykf05 on Tuesday September 29, 2015 @09:05AM (#10295931)
I suppose you could add more methods, e.g sendEmailViaMailGun. But that results in the invoker having to have if-else logic (itself a code smell) for selecting which method to call, which is bad for SRP. You could try to fix that by encapsulating that logic into an EmailRouterStrategy class, but that's just another dependency you have to inject, which is not ideal according to TFA.

There are no comments on this comment yet.