User:Marcelofinki/Transmogrifier (Computer Science)

Transmogrifier (Computer Science)
(sometimes referred to as Demeter Transmogrifiers)

A Demeter Transmogrifier is a small “wrapper” method used to propagate a method/property implemented in an another subsidiary object.

Sample
Imagine three objects: Driver, Car, Engine.

Object  depends on object. Object  depends on object. Object  has a method.

In the above example, car.start is a transmogrifier of engine.start.

Advantage :
 * does not need to "know" about.
 * The driver just uses the  method offered by the   object.  A change on the Engine.Start method will affect the Car object but not the Driver object, since the driver did not use the   method.

Disadvantage :
 * The programmer must code the car.start method.