The implementation of the builder pattern can be complex, but once the builder is available, it simplifies the construction and use of the objects the builder creates.
生成器模式的实现可以很复杂,但一旦生成器可用,它就可以简化生成器所创建对象的构造和使用。
There are many patterns and pattern languages concerned with the distribution, interaction, and construction of components. I provide a few examples here.
目前已经有很多关于组件的分布、交互和构造的模式和模式语言。
You use the builder design pattern when you need to separate the construction of complex objects from their representation, so you can use the same construction process to create a variety of objects.
在需要分离复杂对象的构建和表示时,就需要用到生成器设计模式,您可以使用相同的构造过程来创建多个对象。
应用推荐