The Template Method of the Hive Switchboard
Defining behavioral skeletons via behaviours.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Necromancy // Skeletons
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// ERLANG PATTERN //
-module(the_template).
-export([run_ritual/1]).
-callback initialize() -> ok.
-callback execute_core() -> any().
-callback cleanup() -> ok.
run_ritual(Mod) ->
Mod:initialize(),
Res = Mod:execute_core(),
Mod:cleanup(),
Res.
The Template Method
Erlang Behaviours define the scaffolding. The module provides the specific rites, while the orchestrator executes the unyielding skeleton of the ritual.
Runic Tags:
#erlang
#actors
#telepathy
#switchboard
#template-method