Refreshing patterns
暂无分享,去创建一个
Different authors make different design choices, and their descriptions of the same pattern will vary. Although the author assign to students the original versions of patterns as presented in design patterns, the author also expose them to other published variations. Consider the composite pattern. It supports composing objects into tree structures. In such a structure, an object can either be a container for other objects (playing the role of composite) or not (playing the role of leaf). When design patterns were published, interfaces weren't a part of any popular programming language. So, the authors relied on abstract class definitions which opened the door for declaring default method implementations and common attributes