面向对象设计原则(九)ADP(无环依赖原则)

ADP(The Acyclic Dependencies Principle,无环依赖原则)

在包的依赖关系图中不允许存在环。

 

The dependency structure between packages must be a directed acyclic graph (DAG). That is, there must be no cycles in the dependency structure.

包之间的依赖结构必须是一个直接的无环图形(DAG)。也就是说,在依赖结构中不允许出现环(循环依赖)。

换成另一个说法是:

The dependencies between packages must not form cycles.

包之间的依赖不能是一个环状形式。

你可能感兴趣的:(面向对象)