title: Dependency Injection vs Abstract Factory - choosing the right pattern
body: <p>I'm developing tool that migrates issues from old to new issue tracking system. I have separated everything with interfaces, but I'm not sure what's the best way to glue it back together. I have 3 dependencies, that require runtime data:</p>
  
  <ul>
  <li>INewSystemClient - client to connect to new system</li>
  <li>IRetryStrategy - handles timeouts and retries</li>
  <li>IMigrationSettings</li>
  </ul>
  
  <p>These 3 dependencies are dependencies of many others. I couldn't figure out other way to glue everything, than registering these 3 as singletons (via DI container). I also know, that singletons are considered a bad pattern, so I'm considering switching to abstract factory.</p>
  
  <p>Example relationship which forced me to use singleton:</p>
  
  <ul>
  <li>Dependency1(INewSystemClient client, ...) // constructor for Dependency1</li>
  <li>Dependency2(INewSystemClient client, ...) // constructor for Dependency2</li>
  </ul>
  
  <p>INewSystemClient requires runtime data like user, pw, host etc.</p>
  
  <p>Should I switch to abstract factory and make factory create objects instead of DI container?</p>