The Blob

TheBlob antipattern is mentioned in the AntiPatternsBook (http://www.amazon.com/exec/obidos/tg/detail/-/0471197130/qid=1108063069/sr=8-1/ref=pd_csp_1/002-3703208-2949626?v=glance&s=books&n=507846). This can be commonly found in teams that use ObjectOriented languages such as CeePlusPlus or JavaLanguage, but the architecture is procedural in nature.

Such systems usually have a few classes (Blobs) that have hundreds of methods and variables and encapsulate all the logic that the entire program needs. The rest of the system is littered with many dumb objects.

For more details, visit http://www.antipatterns.com/briefing/sld024.htm

In my experience, there are two common kinds of TheBlob objects - the BaseBlob? and the BlobController?. The former is a weak and naive attempt at Object Orientation and usually involves a base class that is a blob and hundreds of subclasses with little content. I have worked in a place where there were three blobs - one for the UI, one for the business logic and one for the database access. These three classes constituted ~80% of the total logic in the system.

The second kind (BlobController?) is found in systems with many, interrelated objects. Here, all such objects are dumbed down and the BlobController? does everything.

The BlobController? antipattern is probably a MediatorPattern implementation gone wrong. Sometimes, it can be fixed by using the ObserverPattern as well.

The BaseBlob? antipattern can usually be fixed by proper use of delegation, interface inheritance and patterns such as StrategyPattern or VisitorPattern.

-- SriramGopalan


EditText of this page (last edited September 24, 2010) or FindPage with title or text search