🤖▶️ Check out the Design Patterns Overview course by Steve @ardalis Smith!Check it out »Hide

DevIQ

The Blob

The Blob

The_Blob_Sept_2014

The Blob is an anti-pattern that describes a class which resembles the monster from the 1958 film, The Blob, which absorbs anything it touches and grows larger and larger over time. Such classes are similar to God Objects and over time lose any focus they might once have had. Blob classes violate well-known OOP principles such as the Single Responsibility Principle and the Open/Closed Principle, and tend to be more expensive to maintain and lead to Big Ball of Mud systems.

Rather than allow a class to expand like The Blob, refactor using Extract Class and create smaller classes that each have a single responsibility.

References

2014 Telerik Software Craftsmanship Anti-Patterns Wall Calendar

SOLID Principles of Object Oriented Design (Pluralsight)

Edit this page on GitHub

On this page

Sponsored by NimblePros
Sponsored