Methods that do against methods that delegate

Comparing old-style code with the latest-style code, one thing appears immediately: when all the methods processed a bunch of things at the same time (I mean, in particular, the Fortran code that I opened right now), current practice dictates that you have methods that do things, and methods that just call methods that do something.

What is this style formally called, and what was its trigger (examples: literature document, library / structure, only from self-consistent consensus)?

+3
source share
5 answers

, " ". , .

- ...

+2

DRY - , "", , , .

+2

- , . - Observer ( ASP.NET ), - . .

+1

, / - .

+1

, , , , , :

  • . Foo:: getNeighbor - Bar:: getNeighbor - Baz:: getNeighbor, . , Baz:: getNeighbor , Bar "biff", Foo .
  • . , , , . 14- , . 4 .
  • OOP. , . , , , .

, . UML.

+1

Source: https://habr.com/ru/post/1773245/


All Articles