Factory Pattern

Enhance Factory Pattern capabilities for DI in Swift within 3 minutes

Michael Abadi S.
Level Up Coding

--

Factory pattern is one of the common patterns in a programming language. It is one of the creational design patterns that provide a high level of flexibility for your code. One of the interesting use cases that could make Factory pattern become a handy tool to use is Dependency Injection. Normally whenever we want to inject an interface as a dependency on an object, we…

--

--