Zalgorithm

What is a factory?

Factory pattern is a design pattern that allows you to create objects without exposing the instantiation logic to the client. It’s a way to delegate the instantiation of an object to a factory class without the client having to decide the concrete class to instantiate.1

References

Pandey, Abhinav. “Factory pattern in a nutshell.” https://dev.to/abh1navv/factory-pattern-in-a-nutshell-2cif. November 26, 2021.


  1. Abhinav Pandey, “Factory pattern in a nutshell”, https://dev.to/abh1navv/factory-pattern-in-a-nutshell-2cif, November 26, 2021. ↩︎