Top "Factory-pattern" questions

This tag is sometimes used to refer to the Factory Method pattern ([factory-method]) and sometimes used to refer to the Abstract Factory pattern ([abstract-factory]). Please use either of those tags instead of this one.

What is the difference between Builder Design pattern and Factory Design pattern?

What is the difference between the Builder design pattern and the Factory design pattern? Which one is more advantageous and …

design-patterns factory-pattern factory-method builder-pattern
What are the differences between Abstract Factory and Factory design patterns?

I know there are many posts out there about the differences between these two patterns, but there are a few …

factory-pattern factory-method design-patterns abstract-factory
Dependency Injection vs Factory Pattern

Most of the examples quoted for usage of Dependency Injection, we can solve using the factory pattern as well. Looks …

dependency-injection factory-pattern design-patterns
Factory Pattern. When to use factory methods?

When is it a good idea to use factory methods within an object instead of a Factory class?

design-patterns factory factory-pattern factory-method
Implement a simple factory pattern with Spring 3 annotations

I was wondering how I could implement the simple factory pattern with Spring 3 annotations. I saw in the documentation that …

java spring annotations factory-pattern
Why does Hibernate require no argument constructor?

The no-argument constructor is a requirement (tools like Hibernate use reflection on this constructor to instantiate objects). I got this …

java hibernate orm factory-pattern
How do I pass values to the constructor on my wcf service?

I would like to pass values into the constructor on the class that implements my service. However ServiceHost only lets …

wcf dependency-injection factory-pattern
What is the difference between Factory and Strategy patterns?

Can any one explain the difference between factory and strategy patterns? For me both are looking same other than an …

java design-patterns factory-pattern strategy-pattern abstract-factory
Real world examples of Factory Method pattern

I just read Factory Method. I understand that it provides a way to delegate the instantiation to sub-classes. But I …

design-patterns factory-pattern
Factory method with DI and IoC

I am familiar with these patterns but still don't know how to handle following situation: public class CarFactory { public CarFactory(…

c# dependency-injection inversion-of-control factory-pattern