Factory Pattern
The Factory pattern is a creational design pattern that delegates object creation to a dedicated method or class, so calling code can obtain new instances without knowing the concrete class being instantiated.
6 resources across 2 libraries
Glossary Terms(4)
Singleton Pattern
The Singleton pattern is a creational design pattern that restricts a class to a single instance and provides a global point of access to that instance.
Factory Pattern
The Factory pattern is a creational design pattern that delegates object creation to a dedicated method or class, so calling code can obtain new instances with…
Strategy Pattern
The Strategy pattern is a behavioral design pattern that defines a family of interchangeable algorithms, encapsulates each one behind a common interface, and l…
Builder Pattern
The Builder pattern is a creational design pattern that separates the construction of a complex object from its representation, using a step-by-step builder ob…
Interview Questions(2)
What is the Factory Pattern?
The Factory pattern delegates object creation to a dedicated method or class instead of calling a constructor directly, so callers depend on an interface rathe…
Factory Pattern vs Builder Pattern
The Factory pattern encapsulates object creation behind a single method call that returns a fully-formed object of a chosen type, while the Builder pattern con…