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

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.

主站蜘蛛池模板: 庆城县| 繁昌县| 平定县| 尚义县| 高邮市| 门源| 遵化市| 江西省| 凤山县| 时尚| 隆尧县| 佳木斯市| 仙桃市| 镇原县| 剑河县| 大足县| 徐州市| 平潭县| 吉安市| 上饶县| 梨树县| 邵武市| 崇信县| 于田县| 成都市| 常宁市| 伊春市| 邯郸市| 溆浦县| 黑河市| 三原县| 安远县| 黎川县| 葵青区| 平南县| 于都县| 革吉县| 西乌珠穆沁旗| 阜阳市| 钦州市| 雅江县|