Poltergeist (computer programming): Difference between revisions

Content deleted Content added
No edit summary
m Minor grammatical and spacing changes
Line 1:
In [[computer programming]] a '''poltergeist''', or '''gypsy wagon''', is a short lived object used to perform initialization or to invoke methods in otheranother more permanent class.
 
A '''poltergeist''' is an example of an [[anti-pattern]].
Line 5:
The original definition is by Michael Akroyd 1996 - Object World West Conference.
 
As a gypsy wagon or a poltergeist appearappears and disappeardisappears mysteriously, so isdoes this short lived object.
As a consequence the code is more difficult to maintain and there is unnecessary
resource waste.
The typical cause for this antipattern is poor object design.
Gypsy wagon can be identified also by their name.
Typically these are stateless "supervision" classes, used only to call methods of other classes, so several time are called "manager_" , "controller_", "start_process", etc..
 
Gypsy wagons can often be identified by their names. Typically thesethey are stateless "supervision" classes, used only to call methods of other classes, so severalare time areoften called "manager_" , "controller_", "start_process", etc..
To remove a Gypsy Wagon, delete the class and insert its
 
functionality in the invoked class.
To remove a Gypsy Wagon, delete the class and insert its functionality in the invoked class.
 
[[Category:Anti-patterns]]