One, fan-in and fan-out
In software design,
the concepts of fan-in and fan-out refer to the hierarchical calls between application modules.
According to the structured design method,
an application is composed of multiple modules with relatively independent functions.
Fan-in: refers to the number of upper-level modules that directly call the module; a
large fan-in means that the multiplexing program of the module is high.
Fan-out: refers to the number of lower-level modules directly called by the module;
Large fan-out means high complexity of the module, and too many lower-level modules need to be controlled and coordinated;
but too small fan-out (for example, always 1) is not good;
Excessive fan-out is generally due to the lack of intermediate levels, and intermediate-level modules should be appropriately added; if the
fan-out is too small, the lower-level modules can be further decomposed into several sub-function modules,
or merged into its upper-level modules.
2. Good software structure
A well-designed software structure
usually has a large fan-out at the top, a small fan-out in the middle, and a large fan-in at the bottom of the module.