In software engineering, the delegation pattern is an object-oriented design pattern that allows object composition to achieve the same code reuse as inheritance.
In delegation, an object handles a request by delegating to a second object (the delegate). The delegate is a helper object, but with the original context. With language-level support for delegation, this is done implicitly by having self in the delegate refer to the original (sending) object, not the delegate (receiving object). In the delegate pattern, this is instead accomplished by explicitly passing the original object to the delegate, as an argument to a method.[1] "Delegation" is often used loosely to refer to the distinct concept of forwarding, where the sending object simply uses the corresponding member on the receiving object, evaluated in the context of the receiving object, not the original object.
This article uses "sending object/receiving object" for the two objects, rather than "receiving object/delegate", emphasizing which objects send and receive the delegation call, not the original call.
^Gamma et al. 1994
and 20 Related for: Delegation pattern information
Design Patterns: Elements of Reusable Object-Oriented Software (1994) is a software engineering book describing software design patterns. The book was...
engineering, the adapter pattern is a software design pattern (also known as wrapper, an alternative naming shared with the decorator pattern) that allows the...
of a helper class is called a helper object (for example, in the delegationpattern). Helper classes are often created in introductory programming lessons...
indirection are the design patterns of the proxy and the proxy server. Delegation is another classic example of an indirection pattern. In strongly typed interpreted...
In software engineering, a design pattern describes a relatively small, well-defined aspect (i.e. functionality) of a computer program in terms of how...
In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object, dynamically, without...
In software engineering, the composite pattern is a partitioning design pattern. The composite pattern describes a group of objects that are treated the...
conspicuous delegation of authority to a military commander of known motivation, exemplifies a common means of making credible a response pattern that the...
The prototype pattern is a creational design pattern in software development. It is used when the types of objects to create is determined by a prototypical...
but opposed its use to remedy de facto segregation arising from racial patterns of neighborhood residency, as in Delaware; he opposed a proposed constitutional...
"Turquoise Carpet" event on 5 May 2024, where the contestants and their delegations were presented before accredited press and fans, and the opening and...
Sporting event delegation Tajikistan at the 2014 Asian Games, Sporting event delegation Tajikistan at the 2018 Asian Games, Sporting event delegation Tajikistan...
Save a Child's Heart and Latet. Between 1985 and 2015, Israel sent 24 delegations of IDF search and rescue unit, the Home Front Command, to 22 countries...
micromanager monitors and assesses every step of a process and avoids delegation of decisions. Micromanagers are usually irritated when subordinates makes...
other things while the queue is processed by the operating system. This delegation not only frees the program from handling the queue but also allows a more...
what JavaScript's language core fundamentally offers - Delegation. Two function object based patterns already do the trick without the need of a third party's...