官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 大冶市| 启东市| 昭通市| 宁津县| 彭泽县| 平度市| 黔西| 密山市| 辉南县| 额尔古纳市| 安平县| 沁阳市| 临西县| 青州市| 临沧市| 荣昌县| 东乡县| 吉木萨尔县| 喀什市| 红原县| 金门县| 奉节县| 乐山市| 张家界市| 什邡市| 陵水| 宁乡县| 九江市| 观塘区| 安新县| 龙州县| 河东区| 平潭县| 平凉市| 阜康市| 西盟| 拉萨市| 平武县| 古丈县| 高州市| 天长市|