🖥️ VB CURSE DIFFICULTY: Adept Behavioral

The Template Method of Base Classes

Defining the skeleton of a ritual while delegating the specifics.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Conjuration // Scaffolding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// VB PATTERN //
' AbstractRitual.cls (Simulated via interfaces and delegation)
Public Sub ExecuteRitual(impl As IRitualSteps)
    On Error Resume Next
    impl.StepOne_Prepare()
    impl.StepTwo_Summon()
    impl.StepThree_Banish()
End Sub

' IRitualSteps.cls
Public Sub StepOne_Prepare()
End Sub
Public Sub StepTwo_Summon()
End Sub
Public Sub StepThree_Banish()
End Sub

Since VB6 lacks true inheritance, the Template Method is simulated by having a controller class dictate the sequence of operations, calling into a delegated interface that concrete classes implement.

Runic Tags: #template-method #delegation #com