Law of Demeter: A Practical Guide to Loose Coupling

The Law of Demeter (LoD) or principle of least knowledge is a software design and architecture guideline for developing software, particularly object-oriented programs. In its general form, the LoD is a specific case of loose coupling.

Is loosely coupled, easy to change code with a flexible and testable design sound compelling to you? If so then this talk is for you! In this practical session, you will go through examples that follow and/or violate the Law of Demeter principle. We will take a deep dive into what kind of design issues that exposes and how to fix them. Additionally, we will focus on the testing aspect of following the LoD principle together with Single Responsibility and Dependency Inversion principles. At the end of this session, the audience will have a better understanding of how to write a loosely coupled code, how to easily test it and why the Law of Demeter principle is so important in software design and software architecture.

Video producer: