Code Smells

Code Smells / Couplers / Message Chain

Message Chain code smell icon

Message Chain

Message Chains occur when a class (class A), in order to get some data from class D, must access class B and use it to access class C, and use class C to access class D.

The reason to avoid this is that class A becomes reliant on the implementation of the in-between classes (classes B and C).

Left chevron Right chevron

Books about code smells

Learn to write better smelling code.

Refactoring: Improving the Design of Existing Code book cover

Refactoring: Improving the Design of Existing Code

Code smells: A Predictor of Remarkable Quality Improvement book cover

Code smells: A Predictor of Remarkable Quality Improvement

Clean Code: A Handbook of Agile Software Craftsmanship book cover

Clean Code: A Handbook of Agile Software Craftsmanship

I receive a commission on sales made from the above affiliate links.