The Global Breakable is a structural anti-pattern for a system component that is often affected when any other component is changed. It has too many global outgoing dependencies (transitive dependencies). The analogy is similar to Global Butterfly in the case of dependencies. The main difference is that here there are global outgoing dependencies as opposite to global incoming dependencies.
- Global breakables are undesirable because they indicate fragility and lack of modularity in the system.
- A class is directly or indirectly dependent on many other classes.
- Dependencies can be in the form of method calls, member access, and local variable access.
- It reduces maintainability.
- Any changes in the TextArea can break the TextArea.
- C1 to C8 and C17 are directly dependent on TextArea while C9 to C16 and C18 to C29 are indirectly dependent on the TextArea.
- Try to remove direct dependencies on other classes by moving relevant methods and member variables to the class where it belongs.
- Try to avoid Local Breakables and classes with many outgoing dependencies wherever possible, since they support the occurrence of Global Breakables.
- If this does not help, an overall review of the module architecture might be required.