Structural pattern

In software engineering, structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships among 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.{{cite web

| url = http://c2.com/

| title = Adapter Pipeline

| date = 2010-12-31

| publisher = Cunningham & Cunningham, Inc.

| archive-url = http://c2.com/cgi/wiki?AdapterPipeline

| archive-date = 2010-12-31

| access-date = 2012-07-20

}}

  • Retrofit Interface Pattern:{{cite web

| url = http://c2.com/

| title = Retrofit Interface Pattern

| author = BobbyWoolf

| date = 2002-06-19

| publisher = Cunningham & Cunningham, Inc.

| archive-url = http://c2.com/cgi/wiki?RetrofitInterfacePattern

| archive-date = 2002-06-19

| access-date = 2012-07-20

}}{{cite web

| url = http://c2.com/

| title = External Polymorphism

| author = MartinZarate

| date = 2010-12-31

| publisher = Cunningham & Cunningham, Inc.

| archive-url = http://c2.com/cgi/wiki?ExternalPolymorphism

| archive-date = 2010-12-31

| access-date = 2012-07-20

}} 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.{{cite web

| url = http://c2.com/

| title = Tomb Stone

| date = 2007-06-17

| publisher = Cunningham & Cunningham, Inc.

| archive-url = http://c2.com/cgi/wiki?AdapterPipeline

| archive-date = 2007-06-17

| access-date = 2012-07-20

}}

  • Composite pattern: a tree structure of objects where every object has the same interface
  • Decorator pattern: add additional functionality to an object at runtime where subclassing would result in an exponential rise of new classes
  • Extensibility pattern: a.k.a. 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 large quantity of objects share a common properties object to save space
  • Marker pattern: an empty interface to associate metadata with a class.
  • Pipes and filters: a chain of processes where the output of each process is the input of the next
  • Opaque pointer: a pointer to an undeclared or private type, to hide implementation details
  • Proxy pattern: a class functioning as an interface to another thing

See also

References

{{Commons category|Structural software design patterns}}

{{Reflist}}

{{Design Patterns patterns}}

{{DEFAULTSORT:Structural Pattern}}

Category:Software design patterns

Category:Articles with example Java code

Category:Articles with example C Sharp code