Facade
Provide a unified, simplified interface to a labyrinthine subsystem of actors.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Facade
ARCANUM SCHOOL: Illusion // Simplicity
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CONCURRENT ACTOR-MODEL ALCHEMY //
defmodule Tekromancy.Core.Shields, do: def raise, do: :shields_up
defmodule Tekromancy.Core.Engines, do: def ignite, do: :engines_hot
defmodule Tekromancy.Core.Weapons, do: def arm, do: :weapons_hot
defmodule Tekromancy.ShipFacade do
alias Tekromancy.Core.{Shields, Engines, Weapons}
def combat_ready do
[
Shields.raise(),
Engines.ignite(),
Weapons.arm()
]
end
end
Behind the veil lies a chaotic swarm of GenServers handling shields, hyper-drives, and arcane weaponry. The Facade stands before this madness, offering a single, elegant function combat_ready/0. The warlock need not understand the intricate dance of the actors—only the intent to strike.
Runic Tags:
#elixir
#structural
#facade
#api
#subsystems