⚔️ RPG WARD DIFFICULTY: Apprentice Structural

Facade: The Simplified Sigil

Provide a unified interface to a set of complex DB2 subsystems.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Facade
ARCANUM SCHOOL: Illusion // Phantasm
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// RPG PATTERN //
**FREE
Ctl-Opt NoMain;

// The Facade Procedure
Dcl-Proc ProcessOrder Facade Export;
  Dcl-Pi *N Ind;
    OrderNum Int(10) Const;
  End-Pi;

  If Not VerifyInventory(OrderNum);
     Return *Off;
  EndIf;

  ChargeCustomer(OrderNum);
  DispatchShipping(OrderNum);

  Return *On;
End-Proc;

Facade

The Facade is one of the most common spells encountered on the iSeries. It encapsulates convoluted interactions with multiple old-world subsystems (Inventory, Billing, Shipping) into a single, clean Free-Format Business Logic Rune.

Runic Tags: #structural #ibm-i #runes #facade