title: Should I choose Dependency Injection or Factory Pattern
body: <p>I am investigating about Dependency Injection. And I found that: most of the examples quoted for usage of Dependency Injection, we can solve using the factory pattern as well.</p>
  
  <p>Could you please help me compare strong/weak point between DI and Factory pattern? Should I always choose Dependency Injection instead of factory pattern? Or it is depend on specified project? </p>
  
  <p>How can I know what is the best solution? What is best practice for that?</p>