factory-pattern

Use factories when object creation is complex, involves choosing between implementations, or you ... Use when designing system architecture. Architecture category skill.