Measure: Efferent coupling (fan-out per class).
度量:传出耦合(每个类的扇出(fan - out))。
Think of efferent coupling as the inverse of afferent coupling.
可以把传出耦合看作传入耦合的逆转。
Efferent coupling measures the number of classes the current class references.
传出耦合度量当前类引用的类的数量。
As with afferent coupling, the abstractness metric comes into play in efferent coupling.
与传入耦合一样,抽象性度量在传出耦合中起作用。
I'll start out with two of the more interesting coupling metrics, namely afferent coupling and efferent coupling.
我将从两个比较有趣的耦合度量开始,即传入耦合和传出耦合。
You can combine your system's efferent coupling and afferent coupling Numbers to form another metric: instability.
您可以将系统的传出耦合和传入耦合的数量结合起来,形成另一个度量:不稳定性。
This view also shows outgoing calls (efferent coupling) as pink lines and incoming calls (afferent coupling) as red lines.
这个视图还把向外调用(传出耦合)显示为粉红线,把向内调用(传入耦合)显示为红线。
A way to find a class with too much responsibility is through the efferent coupling measure, also referred to as fan out complexity.
找到带有太多责任的类的一个方法就是通过传出耦合度量方法,亦指扇出复杂度。
For example, in Figure 5, the user package has an instability value of 1, meaning it has an efferent coupling of 4 and no afferent coupling.
例如,在图5中,user包的不稳定性值为1,这表示它有一个值为4的传出耦合,而没有传入耦合。
If afferent coupling is a count of components that depend on a particular component, then efferent coupling is the count of components that a particular component depends on.
如果传入耦合是一些依赖于某个特定组件的组件的话,那么传出耦合则是某个特定组件所依赖的一些组件。
The implications of efferent coupling are similar to those of afferent coupling, with regard to how changes affect code. For example, Figure 4, depicts the com.acme.ascp.dao.
对于更改如何影响代码来说,传出耦合的引号意义与传入耦合的类似。
Just as continuously monitoring afferent coupling can uncover entropy in an architectural design, so monitoring efferent coupling can assist you in spotting unwanted dependencies.
正像连续地监视传入耦合可以揭示架构设计中的熵一样,监视传出耦合也有助于发现不必要的依赖性。
As this equation reveals, efferent coupling works against a package's stability: the more a package relies on other packages, the more susceptible it is to ripple effects in the face of change.
如这个等式所示,传出耦合对包的稳定性起作用:一个包越依赖于其他包,面对更改时它越容易受到连锁反应的影响。
For example, in the modification demonstrated in Figure 2, the new efferent coupling of the data layer is now greater than 0 because this layer is now communicating directly to the business layer.
举例而言,在图2所示的修改中,data层的新传出耦合现在大于0,因为该层目前要直接与business层通信。
For example, in the modification demonstrated in Figure 2, the new efferent coupling of the data layer is now greater than 0 because this layer is now communicating directly to the business layer.
举例而言,在图2所示的修改中,data层的新传出耦合现在大于0,因为该层目前要直接与business层通信。
应用推荐