Tag Archives: factory-pattern

Design Patterns: Factory

The factory design pattern consists in a class responsible for creating instances of the requested types. It solves the problem of having decisions all over the place to decide what type it should create.

For example, if we have an application that needs different logic depending on a configuration we can isolate the place where the decision is made:
Continue reading