Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/all-anchors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ include::anchors/dry-principle.adoc[leveloffset=+2]

include::anchors/fowler-patterns.adoc[leveloffset=+2]

include::anchors/gof-design-patterns.adoc[leveloffset=+2]

include::anchors/solid-principles.adoc[leveloffset=+2]

include::anchors/spot-principle.adoc[leveloffset=+2]
Expand Down
48 changes: 48 additions & 0 deletions docs/anchors/gof-design-patterns.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
= GoF Design Patterns
:categories: design-principles
:roles: software-developer, software-architect, educator
:proponents: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
:related: solid-principles, fowler-patterns, clean-architecture
:tags: design-patterns, gang-of-four, oop, creational, structural, behavioral

[%collapsible]
====
Full Name:: Gang of Four Design Patterns

Also known as:: Design Patterns, Gang of Four Patterns

[discrete]
== *Core Concepts*:

Creational Patterns:: Abstract Factory, Builder, Factory Method, Prototype, Singleton — object creation mechanisms

Structural Patterns:: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy — object composition and relationships

Behavioral Patterns:: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor — object interaction and responsibility

Pattern language:: Shared vocabulary for communicating recurring design problems and proven solutions

Composition over inheritance:: Favor object composition for flexibility over rigid class hierarchies

Program to an interface:: Depend on abstractions rather than concrete implementations

Design for change:: Identify what varies in your design and encapsulate it


Key Proponents:: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides ("Design Patterns: Elements of Reusable Object-Oriented Software", 1994)

[discrete]
== *When to Use*:

* Object-oriented design requiring proven solutions to recurring problems
* Communicating design decisions using a shared vocabulary
* Teaching object-oriented design principles through concrete examples
* Refactoring code to increase flexibility and reusability

[discrete]
== *Related Anchors*:

* <<solid-principles,SOLID Principles>> - Design principles that GoF patterns help implement
* <<fowler-patterns,Fowler Patterns>> - Enterprise application architecture patterns (complementary scope)
* <<clean-architecture,Clean Architecture>> - Architectural style leveraging GoF principles
====
5 changes: 5 additions & 0 deletions skill/semantic-anchor-translator/references/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ Source: https://github.com/LLM-Coding/Semantic-Anchors
### SSOT (Single Source of Truth)
- **Core:** One system is the master for specific data

### GoF Design Patterns
- **Also known as:** Design Patterns, Gang of Four Patterns
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
- **Core:** 23 patterns in 3 categories (Creational, Structural, Behavioral), pattern language, composition over inheritance, program to an interface

### Patterns of Enterprise Application Architecture (PEAA)
- **Proponents:** Martin Fowler
- **Core:** Repository, Unit of Work, Data Mapper, Active Record, etc.
Expand Down
Loading