Secret Society

Secret Society is a development anti-pattern that occurs as a consequence of poor abstraction. The methods of the poorly abstracted objects are insufficient to engage in a conversation and so a new function or method is added (a secret society) whose purpose is to process the conversation. That function/method takes as its arguments all of the participants in the conversation and any other controls. The secret society function/method then becomes responsible for maintaining the state of the participating objects, hence breaking encapsulation. When this anti-pattern is widely applied, the definition and maintenance of each classes state becomes distributed through a collection of secret societies.

Isn't this more of a CodeSmell? It looks like a specific instance of GodClass. It doesn't seem like it justifies the AntiPattern label, especially since the problem is the poor abstractions being covered, not the method of covering them up. -- JesseMillikan
Every thing is a CodeSmell - just some are specific enough to call names. I have seen this one but it's very rare. - ATM


View edit of August 20, 2013 or FindPage with title or text search