The Local Breakable component has many immediate outgoing dependencies. Such a component carries excessive responsibility and is typically identified by many long methods. It represents too many local outgoing dependencies. The analogy is similar to Local Butterfly in the case of dependencies. The main difference here is that, there are local outgoing dependencies as instead of local incoming dependencies in Local Butterfly.

Impact

  • Breakables make the code difficult to understand, to maintain and to reuse.

Characteristics

  • The class is directly dependent upon too many other classes.
  • The dependencies can be a member access or a local variable access to other classes.

Example(s)

  • TextArea has 17 dependencies.
  • C1 to C16 are direct dependencies.

Guidelines

  • Try to remove direct dependencies on other classes by moving relevant methods and member variables to the class where it belongs.
  • Extract new classes which logically group member variables and methods acting upon them.