The Community for Technology Leaders
Green Image
Issue No. 05 - September/October (1989 vol. 6)
ISSN: 0740-7459
pp: 38-48
<p>The language-independent Law of Demeter, which encodes the ideas of encapsulation and modularity in an easy-to-follow form for object-oriented programmers, is presented. The law was developed during the design and implementation of the Demeter system, which provides a high-level interface to class-based, object-oriented systems. Two forms of the law, the class and object forms, are described. Its motivation is to ensure that the software is as modular as possible. Principles covered by the law include coupling control, information hiding, information restriction, information localization, and structured induction. An example is given to show how the law is applied, and valid violations are identified. It is shown how to transform a method that does not satisfy the law into one that does.</p>
class forms; good style; object-oriented programs; Law of Demeter; encapsulation; modularity; Demeter system; high-level interface; object forms; coupling control; information hiding; information restriction; information localization; structured induction; object-oriented programming; programming environments; user interfaces

I. M. Holland and K. J. Lieberherr, "Assuring Good Style for Object-Oriented Programs," in IEEE Software, vol. 6, no. , pp. 38-48, 1989.
94 ms
(Ver 3.3 (11022016))