Creational design patterns are often used when a direct instantiation with constructors is required. They make the creation process more adaptable and dynamic. In particular, they can provide a great deal of flexibility about which objects are created, how those objects are created, and how they are initialized.
- Hits: 1254
It is used in scenarios where application needs to create a number of instances of a class, which has almost same state or differs very little.
- Hits: 1194
Builder pattern is an alternative way to construct complex objects and should be used only when the increase of object constructor parameter combination leads to an exponential list of constructors. Instead of using numerous constructors, the builder pattern uses another object, a builder, that receives each initialization parameter step by step and then returns the resulting constructed object at once.
- Hits: 6300
Provide an interface for creating dependent objects without specifying their concrete classes.