Bridge: The Cross-Platform Rune
Decouple an abstraction from its implementation so that the two can vary independently.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Bridge
ARCANUM SCHOOL: Transmutation // Artifice
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// RPG PATTERN //
**FREE
Ctl-Opt NoMain;
Dcl-Ds Implementor_t Qualified Template;
ExecuteProc Pointer(*Proc);
End-Ds;
Dcl-Proc ExecuteAbstraction Export;
Dcl-Pi *N;
pImplementor Pointer Value;
End-Pi;
Dcl-Ds Impl Likeds(Implementor_t) Based(pImplementor);
Dcl-Pr RunImpl ExtProc(Impl.ExecuteProc);
End-Pr;
// Abstraction logic
RunImpl();
End-Proc;
Bridge
Through the manipulation of procedure pointers on the iSeries, the Bridge pattern decouples the high-level Business Logic from the low-level DB2 or IFS manipulation spells, allowing independent evolution of both abstractions and implementations.
Runic Tags:
#structural
#ibm-i
#runes
#bridge