Middle man smell

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: In object oriented programming, it is common to delegate some work to other objects. However, if a class delegates the majority of work to another class, it is just a middle man and should...)
 
m (Reverted edits by Ebybymic (Talk); changed back to last version by Matthew Harward)
 
(3 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
* [[Mediator]] can turn into a middle man that does little other than delegating to other objects.
 
* [[Mediator]] can turn into a middle man that does little other than delegating to other objects.
 
* [[Facade]] by definition delegates to classes in a subsystem that is being hidden from other parts of the system.
 
* [[Facade]] by definition delegates to classes in a subsystem that is being hidden from other parts of the system.
 +
 +
== See also ==
 +
* [[Code smells]]
 +
 +
{{Template:CodeSmells}}
 +
 +
[[Category:Code smells]]

Latest revision as of 03:08, 25 November 2010

In object oriented programming, it is common to delegate some work to other objects. However, if a class delegates the majority of work to another class, it is just a middle man and should be removed. Instead, you should talk directly to the class that implements the behavior rather than going through the middle man.

Conflicts

  • Mediator can turn into a middle man that does little other than delegating to other objects.
  • Facade by definition delegates to classes in a subsystem that is being hidden from other parts of the system.

See also


Personal tools