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.
- Breakables make the code difficult to understand, to maintain and to reuse.
- The class is directly dependent upon too many other classes.
- The dependencies can be
a memberaccess or a localvariable access to other classes.
- TextArea has 17 dependencies.
- C1 to C16 are direct dependencies.
- 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.