Assuring good style for object-oriented programs
Karl J. Lieberherr, Ian M. Holland · IEEE Software · 1989
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.>
Cited by 227 works. doi:10.1109/52.35588
Authors
References
- Abstraction and Specification in Program Development
- Research directions in object-oriented programming
- The Modular Structure of Complex Systems
- Object-oriented programming: an objective sense of style
- Laws for Communicating Parallel Processes
- Demeter: a case study of software growth through parameterized classes
- Object-oriented programming with class dictionaries
- A Taste of Smalltalk
- Comments on “the law of demeter” and C++