Спасибо, клевая штука. У меня есть вопросы, не все я понял, не все...
На первом листе в разделе Dependencies\Feature Envy:
The methods of a class should be interested in the variables and functions
of the class they belong to, and not the variables and functions of other
classes. When a method uses accessors and mutators of some other object
to manipulate the data within that object, then it envies the scope of the
class of that other object. It wishes that it were inside that other class so
that it could have direct access to the variables it is manipulating.
Вот это я понять не могу, в чем суть?
вообще многие советы они или не о чем "Too dense algorithms that lose all expressiveness."
или спорные "Return a constant to get first test running. Refactor later."
или вообще бред "A test checks exactly one feature of the testee."
Здравствуйте, BluntBlind, Вы писали:
BB>На первом листе в разделе Dependencies\Feature Envy:
BB>The methods of a class should be interested in the variables and functions
BB>of the class they belong to, and not the variables and functions of other
BB>classes. When a method uses accessors and mutators of some other object
BB>to manipulate the data within that object, then it envies the scope of the
BB>class of that other object. It wishes that it were inside that other class so
BB>that it could have direct access to the variables it is manipulating.
BB>
BB>Вот это я понять не могу, в чем суть?
Похоже на изложение
закона Деметры
Обсуждение идет
чуть нижеАвтор: AlexRK
Дата: 19.07.13
в этом же разделе форума