Use sharing to support large numbers of fine-grained objects efficiently. 一、 享元(Flyweight)模式Flyweight在拳擊比賽中指最輕量級,即"蠅量級",有些作者翻譯為"羽量級"。這裡使用"享元模式"更能反映模式的用意。享元模式以共用的方式高效地支援大量的細粒度對象。享元對象能做到共用的關鍵是區分內蘊狀態(Internal State)和外蘊狀態(External
建立型模式列表 Abstract Factory Creates an instance of several families of classes Builder Separates object construction from its representation Factory Method Creates an instance of several derived classes Prototype A fully initialized instance to
來自於:http://www.cnblogs.com/zhenyulu/articles/41829.html參考:http://www.dofactory.com/Patterns/PatternComposite.aspxDefine:Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and
Define:Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it. 一、 職責鏈(Chain of
Define:Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.
來自於:http://www.cnblogs.com/zhenyulu/articles/46735.html參考於:http://www.dofactory.com/Patterns/PatternDecorator.aspxDefine:Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for
本文翻譯自:http://www.dofactory.com/Patterns/PatternInterpreter.aspxDefine:Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.