Firstly, the Demeter Law, like most programming rules, is rather a principle or a directive, and there are cases when the principle is not applied. However, the Law of Demeter does not really apply to the Passive view, because the cause of the law is not a problem in this case.
Demeter's Law tries to prevent a chain of dependencies, for example:
objectA.objectB.objectC.DoSomething();
, objectB objectD , objectA . , , .
, , , :
//from presenter
view.MeaningfulName = "data";
:
public string MeaninfulName
{
get
{
return someControl.text;
}
set
{
someControl.text = value;
}
, .