“Watch for coupling that's too tight. "Coupling" refers to how tight the connection is between two classes. In general, the looser the connection, the better. Several general guidelines flow from this concept: Minimize accessibility of classes and members. Avoid friend classes, because they're tightly coupled. Make data private rather than protected in a base class to make derived classes less tightly coupled to the base class. Avoid exposing member data in a class's public interface. Be wary of semantic violations of encapsulation. Observe the "Law of Demeter" (discussed in Design and Implementation Issues of this chapter). Coupling goes hand in glove with abstraction and encapsulation. Tight coupling occurs when an abstraction is leaky, or when encapsulation is broken.”
―
Code Complete
Share this quote:
Friends Who Liked This Quote
To see what your friends thought of this quote, please sign up!
0 likes
All Members Who Liked This Quote
None yet!
This Quote Is From
Browse By Tag
- love (101167)
- life (79149)
- inspirational (75693)
- humor (44279)
- philosophy (30902)
- inspirational-quotes (28806)
- god (26832)
- truth (24705)
- wisdom (24547)
- romance (24311)
- poetry (23209)
- life-lessons (22560)
- quotes (20929)
- death (20514)
- travel (19190)
- happiness (18929)
- hope (18499)
- faith (18356)
- inspiration (17279)
- spirituality (15666)
- relationships (15480)
- religion (15357)
- life-quotes (15264)
- motivational (15263)
- love-quotes (15091)
- writing (14924)
- success (14161)
- motivation (13113)
- time (12828)
- motivational-quotes (12085)