Coupling

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: == Coupling == Coupling refers to the degree of direct knowledge that one class has of another. This is not meant to be interpreted as encapsulation vs. non-encapsulation. It is not a ref...)
 
(Merged with coupling and cohesion page)
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
== Coupling ==
+
#REDIRECT [[Coupling and cohesion]]
 
+
Coupling refers to the degree of direct knowledge that one class has of another. This is not meant to be interpreted as encapsulation vs. non-encapsulation. It is not a reference to one class's knowledge of another class's attributes or implementation, but rather knowledge of that other class itself.
+
 
+
Strong coupling occurs when a dependent class contains a pointer directly to a concrete class which provides the required behavior. Loose coupling occurs when the dependent class contains a pointer only to an interface, which can then be implemented by one or many concrete classes. Loose coupling provides extensibility to your design. You can easily add a new concrete class later that implements that same interface without ever having to modify and recompile the dependent class. Strong coupling does not allow this.
+
 
+
== Other places for information on Coupling ==
+
 
+
* [[http://en.wikipedia.org/wiki/Coupling_(computer_science)|Wikipedia : Coupling]]
+

Latest revision as of 04:18, 24 July 2009

  1. REDIRECT Coupling and cohesion
Personal tools