Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只是研究Builder模式,不明白Director的意思。
http://en.wikipedia.org/wiki/Builder_pattern
仅仅拥有 Builder 及其子类就足够了吗?
谢谢
Builder 公开了对正在生产的项目进行更改的方法。Director 知道对于给定的用途,哪些方法应该被调用,以及以什么顺序调用。
Builder 可以重复用于多种目的,并且包含产品内部的知识。Director 用于特定目的,并且包含有关产品需要在预期领域中使用的知识。