This anti-pattern applies to classes or modules which have the implementation spread across multiple files.

Impact

  • As the implementation is spread across multiple files, these modules/ classes tend to be large and often violate the single responsibility principle.
  • The module/ class often grows over time and ends up becoming a central module/ class (or even a God class).

Characteristics

  • The implementation is spread across multiple files.
  • In general, multiple files are added over the history of the module/ class instead of creating a new module/ class for a new responsibility.

Guidelines

  • Since the module/ class is already split into multiple files, it should be seen if those files point to different responsibilities of the module/ class.
  • Often these modules/ classes point to missing abstractions. If such abstractions exist, they should be extracted out.