From IT Skills
let subclasses decide which class to instantiate.
- Lazy initialization... appears in the GoF catalog as "virtual proxy", an implementation strategy for the #Proxy pattern
- Object pool pattern... uses a set of initialized objects kept ready to use – a "pool" – rather than allocating and destroying them on demand
- Adapter... Lets classes work together that couldn't otherwise because of incompatible interfaces
- its subclass uses foreign interface, but in #Proxy such implementation detail is unknown
- Decorator allows behavior to be added to an individual object, dynamically, without affecting the behavior of other objects from the same class... Decorator use can be more efficient than subclassing - it is Cacheing
- bridge pattern is useful when both the class and what it does vary often... An abstraction and its implementation should be defined and extended independently from each other... implementation can be selected at run-time.
sender and receiver have same interface
- Memento provides the ability to restore an object to its previous state (undo)... originator is some object that has an internal state.. caretaker first asks the originator for a memento object. Then it does whatever operation.. To roll back to the state before the operations, it returns the memento object to the originator.
- Observer (or Publish/subscribe)
- State, Strategy, Interpreter has Context; Template is a young Strategy
This category has the following 9 subcategories, out of 9 total.
Pages in category "Design patterns"
The following 19 pages are in this category, out of 19 total.