❄️ COLDFUSION TAG DIFFICULTY: Apprentice Creational

The Factory Method of Apparitions

Delegate the instantiation of tag-wards to subclasses of the arcane arts.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Factory Method
ARCANUM SCHOOL: Conjuration // Summoning
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// COLDFUSION PATTERN //
interface name="ISummoner" {
    public IApparition summon();
}

component name="DemonSummoner" implements="ISummoner" {
    public IApparition function summon() {
        return new DemonApparition();
    }
}

component name="AngelSummoner" implements="ISummoner" {
    public IApparition function summon() {
        return new AngelApparition();
    }
}

The Factory Method establishes an interface for creating objects, but lets subclasses decide which class to instantiate. The master Adobe Alchemist defines the core invocation pattern, while apprentice mages specify the precise spirit to pull from the ether.

Runic Tags: #factory-method #coldfusion #summoning #instantiation