Robo Home | Changes | Preferences | AllPages

Coupling is a measure of how much one class must know about another class to function. Loose coupling is desireable in good Object-Oriented programming, meaning that the objects' implementations are fairly independent of how they are used by other objects. Another word that is related conceptually to loose coupling is encapsulation. Signs of tight coupling (and typically bad design) are public variables in classes, especially public static non-final variables, any assumptions an object makes about the class that created it, and any unnecessary passing of a creating object to the created object. The last of those things has the most exceptions I suppose. Robots that are meant to have smaller code (see NanoBots, MicroBots, or MiniBots) often sacrifice good coupling to save space, and make all variables in helper classes public.

Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited March 28, 2003 1:22 EST by Kawigi (diff)