У нас вы можете посмотреть бесплатно Delphi: Clean Code: Objects Calisthenics: Rule #5 - One DOT per line (Demeter's law) или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
"The ThoughtWorks Anthology" - Jeff Bay (2008) Objects Calisthenics: Rule #5: One DOT per line (Demeter's law) It can be quite daunting to decide which object should take responsibility for an action. But a great strategy to identify misplaced responsibilities is to search for lines with multiple dots, as these often indicate a violation of encapsulation or a middleman object that knows too much. This rule underscores the importance of adhering to the Law of Demeter, advocating for direct communication with an object rather than "poking around" its internals. Adhering to this guideline significantly improves readability and debuggability, as it isolates actions to specific lines and makes it easier to pinpoint errors. To better picture this, imagine having a trace that shows an exception on a line with 4 dots. Exceptions to this rule include Fluent Interfaces and the Method Chaining Pattern, where the goal is clarity. But even then, a better approach is through a "taller" rather than "wider" code structure. This means separating one dot per line to make it easier to reason about and follow.