Factory pattern
Factory objects have several advantages:Separate the responsibility of complex creation into cohesive helper objects.Hide potentially complex creation logic.Allow introduction of performance-enhancing memory management strategies, such as object caching or recycling.Name:FactoryProblem:Who should be responsible for creating objects when there are special considerations, such as complex creation logic, a desire to separate the creation responsibilities for better cohesion, and so forth?Solution:
GRASP
GRASP stands for General Responsibility Assignment Software Patterns (or sometimes Principles). It is used in object oriented design, and gives guidelines for assigning responsibility to classes and objects.Examples of different patterns/principles used in GRASP are: Information Expert, Creator, Controller, Low Coupling, High Cohesion, Polymorphism, Pure Fabrication, Indirection, Protected Variations. All these patterns answer some software problem, and in almost every case these problems are co
Adapter
Adapter is something that extracted from a series of similar components.The job of adapter is to delegate to the correct implementation with a consistent interface to the components client.[@more@]Adapter
GOF
GOF: Gang of Four.中文俗称四人帮。四个人的名字是:Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides。他们在1994年发布了GOF design pattern,成为面向对象领域重要的理论和best practice。[@more@]