Jump to content

Structural pattern

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Yobot (talk | contribs) at 15:50, 6 April 2013 (References: Remove unicode control characters (CHECKWIKI error 16) using AWB (9065)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In software engineering, structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships between entities.

Examples of Structural Patterns include:

  • Adapter pattern: 'adapts' one interface for a class into one that a client expects
    • Adapter pipeline: Use multiple adapters for debugging purposes.[1]
    • Retrofit Interface Pattern:[2][3] An adapter used as a new interface for multiple classes at the same time.
  • Aggregate pattern: a version of the Composite pattern with methods for aggregation of children
  • Bridge pattern: decouple an abstraction from its implementation so that the two can vary independently
    • Tombstone: An intermediate "lookup" object contains the real location of an object.[4]
  • Composite pattern: a tree structure of objects where every object has the same interface
  • Decorator pattern: add additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes
  • Extensibility pattern: aka. Framework - hide complex code behind a simple interface
  • Facade pattern: create a simplified interface of an existing interface to ease usage for common tasks
  • Flyweight pattern: a high quantity of objects share a common properties object to save space
  • Pipes and filters: a chain of processes where the output of each process is the input of the next
  • Private class data pattern: restrict accessor/mutator access
  • Proxy pattern: a class functioning as an interface to another thing

See also

References

  1. ^ "Adapter Pipeline". Cunningham & Cunningham, Inc. 2010-12-31. Archived from the original on 2010-12-31. Retrieved 2012-07-20.
  2. ^ BobbyWoolf (2002-06-19). "Retrofit Interface Pattern". Cunningham & Cunningham, Inc. Archived from the original on 2002-06-19. Retrieved 2012-07-20. {{cite web}}: Check |authorlink= value (help); External link in |authorlink= (help)
  3. ^ MartinZarate (2010-12-31). "External Polymorphism". Cunningham & Cunningham, Inc. Archived from the original on 2010-12-31. Retrieved 2012-07-20. {{cite web}}: Check |authorlink= value (help); External link in |authorlink= (help)
  4. ^ "Tomb Stone". Cunningham & Cunningham, Inc. 2007-06-17. Archived from the original on 2007-06-17. Retrieved 2012-07-20.