Delegation Pattern

moved from DeleGation

In general, the passing of responsibility from one logical grouping of code to another. Specifically, when one method passes control to another method. The called method is usually defined in a separate class, which may be swappable at runtime (see PolyMorphism.) For example, a Save method in a business tier object, rather than accessing the data store directly, may create a data tier object and call a method on that object, which in turn writes to the database.

Delegation is a common theme in ObjectOrientedProgramming, and is used in numerous DesignPatterns. Many different responsibilities may be delegated... object creation, business logic, and data access, to name a few.


CategoryPolymorphism


EditText of this page (last edited July 15, 2003) or FindPage with title or text search