How to solve the violations of the Law of Demeter?

My understanding of consequences of the Law of Demeter seems to be different to DrJokepu’s – whenever I’ve applied it to object oriented code it’s resulted in tighter encapsulation and cohesion, rather than the addition of extra getters to contract paths in procedural code. Wikipedia has the rule as More formally, the Law of Demeter … Read more

Coupling, Cohesion and the Law of Demeter

Grady Booch in “Object Oriented Analysis and Design”: “The idea of cohesion also comes from structured design. Simply stated, cohesion measures the degree of connectivity among the elements of a single module (and for object-oriented design, a single class or object). The least desirable form of cohesion is coincidental cohesion, in which entirely unrelated abstractions … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)