title: Are these both the abstract factory pattern?
body: <p>I think the original use of the abstract factory pattern is when you want to create a family of related objects. This is what is described in <a href="https://en.wikipedia.org/wiki/Design_Patterns" rel="nofollow noreferrer">Gang of Four (GoF)</a> and this tutorial: <a href="http://www.oodesign.com/abstract-factory-pattern.html" rel="nofollow noreferrer">http://www.oodesign.com/abstract-factory-pattern.html</a></p>
  
  <p>I keep also seeing posts that the abstract factory pattern can be used for dependency injection, particulary for injecting values that are worked out at runtime. All the uses of abstract factory pattern given here seem to be referring to this method: <a href="https://stackoverflow.com/questions/2280170/why-do-we-need-abstract-factory-design-pattern/2280289#2280289">Why do we need Abstract factory design pattern?</a></p>
  
  <p>Are these two actually the same pattern, implemented exactly the same, or do they both just have the same name because an abstract factory gets used in them both? Even if they are both implemented in the same way, there are other patterns that have a similar implementation (eg. state and strategy) but different names because they have different motivations, should that be the case here too since the reason for creating the abstract factory in the two cases are completely different?</p>