Gof Pattern Confusion

Telling apart the patterns that look alike, so a design is not chosen because a name sounded right. Covers the four wrappers (Adapter, Decorator, Proxy, Facade) and the two questions that separate them, Strategy against State against Template Method against Command, Observer against Mediator, the three creational lookalikes plus the static factory that is not Factory Method, Composite against Decorator, Visitor against Iterator, Command against Event, and Memento against snapshot against event sourcing. Use when two patterns both seem to fit, when a review comment disputes what a class is, when a wrapper's kind must be named, when a class is described with a pattern name that does not match what it does, or when documenting an existing design. Does not cover getting from a problem to a shortlist (gof-pattern-selection), the reasoning discipline (gof-pattern-thinking), any individual pattern's own guidance (the gof-* skills), or misuse catalogues (gof-pattern-antipatterns).

robsonkades Updated

File contents

robsonkades/agent-skills/tree/main/skills/gof-pattern-confusion commit a043cd3f4f

Frequently asked questions

npx skillmds@latest add robsonkades/gof-pattern-confusion