Interface bloat
Encyclopedia
In software design
, interface bloat (also called fat interfaces by Bjarne Stroustrup
and Refused Bequests by Martin Fowler
) is a term used to describe interfaces
that try to incorporate all possible operations on some data into an interface, only to find that most of the objects cannot perform the given operations.
One might consider using visitor pattern
, Adapter Pattern
, or interface separation instead.
Interface bloat is an example of an anti-pattern
.
Software design
Software design is a process of problem solving and planning for a software solution. After the purpose and specifications of software are determined, software developers will design or employ designers to develop a plan for a solution...
, interface bloat (also called fat interfaces by Bjarne Stroustrup
Bjarne Stroustrup
Bjarne Stroustrup ; born December 30, 1950 in Århus, Denmark) is a Danish computer scientist, most notable for the creation and the development of the widely used C++ programming language...
and Refused Bequests by Martin Fowler
Martin Fowler
-Online presentations:* at RailsConf 2006* at JAOO 2006* at QCon London 2007 * at QCon London 2008 * at ThoughtWorks Quarterly Technology Briefing, October 2008...
) is a term used to describe interfaces
Interface (computer science)
In the field of computer science, an interface is a tool and concept that refers to a point of interaction between components, and is applicable at the level of both hardware and software...
that try to incorporate all possible operations on some data into an interface, only to find that most of the objects cannot perform the given operations.
One might consider using visitor pattern
Visitor pattern
In object-oriented programming and software engineering, the visitor design pattern is a way of separating an algorithm from an object structure on which it operates. A practical result of this separation is the ability to add new operations to existing object structures without modifying those...
, Adapter Pattern
Adapter pattern
In computer programming, the adapter pattern is a design pattern that translates one interface for a class into a compatible interface...
, or interface separation instead.
Interface bloat is an example of an anti-pattern
Anti-pattern
In software engineering, an anti-pattern is a pattern that may be commonly used but is ineffective and/or counterproductive in practice.The term was coined in 1995 by Andrew Koenig,...
.