- Spring 5 Design Patterns
- Dinesh Rajput
- 146字
- 2021-07-08 09:59:34
Builder design pattern
Separate the construction of a complex object from its representation so that the same construction process can create different representations. - GOF Design Patterns
The Builder design pattern is used to construct a complex object step by step, and finally it will return the complete object. The logic and process of object creation should be generic so that you can use it to create different concrete implementations of the same object type. This pattern simplifies the construction of complex objects and it hides the details of the object's construction from the client caller code. When you are using this pattern, remember you have to build it one step at a time, which means you have to break the object construction login into multiple phases, unlike other patterns, such as the abstract factory and the factory method pattern, which the object in a single step.
推薦閱讀
- DevOps:軟件架構師行動指南
- Visual C++程序設計教程
- 程序員修煉之道:程序設計入門30講
- Implementing Modern DevOps
- 數據結構和算法基礎(Java語言實現)
- PostgreSQL Cookbook
- 深入淺出Spring Boot 2.x
- STM32F0實戰:基于HAL庫開發
- 深入淺出RxJS
- Responsive Web Design by Example
- 編程與類型系統
- Learning Apache Karaf
- Java EE企業級應用開發教程(Spring+Spring MVC+MyBatis)
- 一步一步跟我學Scratch3.0案例
- Mastering Gephi Network Visualization