- Spring 5 Design Patterns
- Dinesh Rajput
- 238字
- 2021-07-08 09:59:31
Abstract factory design pattern
The Abstract Factory pattern comes under the creational design pattern. It is a high-level design pattern compared to the factory method design pattern. According to this design pattern, you just define an interface or abstract class to create a related dependent object without specifying its concrete subclass. So here, the abstract factory returns a factory of classes. Let me simplify it for you. You have a set of factory method design patterns, and you just put these factories under a factory using the factory design pattern, which means that it is simply a factory of factories. And there is no need to take the knowledge about all of the factories into the factory--you can make your program using a top-level factory.
In the Abstract Factory pattern, an interface is responsible for creating a factory of related objects without explicitly specifying their classes. Each generated factory can give the objects as per the Factory pattern.
The benefits of the Abstract Factory pattern are as follows:
- The Abstract Factory Design provides loose coupling between the component families. It also isolates the client code from concrete classes.
- This design pattern is a higher-level design than the Factory pattern.
- This pattern provides better consistency at construction time of objects across the application.
- This pattern easily swaps component families.
- 實戰Java程序設計
- ASP.NET動態網頁設計教程(第三版)
- jQuery從入門到精通 (軟件開發視頻大講堂)
- 重學Java設計模式
- Apex Design Patterns
- Learning Python by Building Games
- 零基礎輕松學SQL Server 2016
- 數據結構習題解析與實驗指導
- BIM概論及Revit精講
- Salesforce Reporting and Dashboards
- SQL Server與JSP動態網站開發
- ASP.NET程序開發范例寶典
- 輕松上手2D游戲開發:Unity入門
- 區塊鏈國產化實踐指南:基于Fabric 2.0
- Machine Learning for OpenCV