Handle-Body pattern

E679868

The Handle-Body pattern is a software design approach that separates an object’s public interface (“handle”) from its internal implementation and state (“body”) to enable encapsulation, flexibility, and easier maintenance.

Try in SPARQL Jump to: Statements Referenced by

Statements (48)

Predicate Object
instanceOf object-oriented design pattern
software design pattern
addressesConcern binary compatibility across library versions
compile-time coupling
information hiding
canUseMechanism copy-on-write semantics
indirection via pointer or reference
reference counting for shared bodies
enables changing implementation at runtime in some designs
reducing compilation dependencies
stable public API
hasAlternativeName Cheshire Cat pattern NERFINISHED
Envelope-Letter pattern
Handle/Body idiom
Handle/Body pattern NERFINISHED
hasComponent body
handle
isCategoryOf encapsulation pattern
interface-implementation separation pattern
isSimilarTo Bridge pattern NERFINISHED
Pimpl idiom NERFINISHED
isUsedIn C++ NERFINISHED
object-oriented languages
relatedConcept encapsulation principle
interface segregation
opaque pointer
separates internal implementation
internal state
public interface
supports binary compatibility
easier maintenance
encapsulation
evolution of implementation without changing interface
flexibility
implementation hiding
tradeOff adds level of indirection
increases implementation complexity
may introduce runtime overhead
typicalBodyRole implements actual behavior
is hidden from clients
stores internal state
typicalHandleRole exposes public methods
forwards calls to body
manages lifetime of body
usedFor allowing ABI-stable libraries
hiding private data members
reducing header file exposure in C++
supporting plugin-like replaceable implementations

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

Bridge alsoKnownAs Handle-Body pattern