- Building Microservices with Spring
- Dinesh Rajput Rajesh R V
- 106字
- 2021-07-02 14:54:02
Common problems where you should apply the Abstract factory design pattern
When you design a Factory pattern for object creation in your application, there are times when you want a particular set of related objects to be created with certain constraints and apply the desired logic across the related objects in your application. You can achieve this design by creating another factory inside the factory for a set of related objects and apply the required constraints. You can also program the logic to a set of related objects.
When you want to customize the instantiation logic of related objects, then you could use this design pattern.