Software Patterns, Structural Flashcards
Adapter or Wrapper or Translator.
Convert the interface of a class into another interface clients expect. An adapter lets classes work together that could not otherwise because of incompatible interfaces. Wraps an object provide a different interface to it.
Bridge
Decouple an abstraction from its implementation allowing the two to vary independently.
Composite
Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
Clients treat collections and individual objects uniformly.
Decorator
Attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternative to subclassing for extending functionality.
Wraps an object to provide new behaviors.
Facade
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
Simplifies the interface of a set of classes.
-Flyweight
Use sharing to support large numbers of similar objects efficiently.
-Front Controller
The pattern relates to the design of Web applications. It provides a centralized entry point for handling requests.
Module
Group several related elements, such as classes, singletons, methods, globally used, into a single conceptual entity.
Proxy
Provide a surrogate or placeholder for another object to control access to it.
-Twin
Twin allows to model multiple inheritance in programming languages that do not support this feature.