Skip to content

Commit c81dacd

Browse files
authored
Merge pull request #140 from Nantero1/add-anchor-gof-design-patterns
feat: Add GoF Design Patterns semantic anchor
2 parents 4555257 + d6e8371 commit c81dacd

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

docs/all-anchors.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ include::anchors/dry-principle.adoc[leveloffset=+2]
2525

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

28+
include::anchors/gof-design-patterns.adoc[leveloffset=+2]
29+
2830
include::anchors/solid-principles.adoc[leveloffset=+2]
2931

3032
include::anchors/spot-principle.adoc[leveloffset=+2]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
= GoF Design Patterns
2+
:categories: design-principles
3+
:roles: software-developer, software-architect, educator
4+
:proponents: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
5+
:related: solid-principles, fowler-patterns, clean-architecture
6+
:tags: design-patterns, gang-of-four, oop, creational, structural, behavioral
7+
8+
[%collapsible]
9+
====
10+
Full Name:: Gang of Four Design Patterns
11+
12+
Also known as:: Design Patterns, Gang of Four Patterns
13+
14+
[discrete]
15+
== *Core Concepts*:
16+
17+
Creational Patterns:: Abstract Factory, Builder, Factory Method, Prototype, Singleton — object creation mechanisms
18+
19+
Structural Patterns:: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy — object composition and relationships
20+
21+
Behavioral Patterns:: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor — object interaction and responsibility
22+
23+
Pattern language:: Shared vocabulary for communicating recurring design problems and proven solutions
24+
25+
Composition over inheritance:: Favor object composition for flexibility over rigid class hierarchies
26+
27+
Program to an interface:: Depend on abstractions rather than concrete implementations
28+
29+
Design for change:: Identify what varies in your design and encapsulate it
30+
31+
32+
Key Proponents:: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides ("Design Patterns: Elements of Reusable Object-Oriented Software", 1994)
33+
34+
[discrete]
35+
== *When to Use*:
36+
37+
* Object-oriented design requiring proven solutions to recurring problems
38+
* Communicating design decisions using a shared vocabulary
39+
* Teaching object-oriented design principles through concrete examples
40+
* Refactoring code to increase flexibility and reusability
41+
42+
[discrete]
43+
== *Related Anchors*:
44+
45+
* <<solid-principles,SOLID Principles>> - Design principles that GoF patterns help implement
46+
* <<fowler-patterns,Fowler Patterns>> - Enterprise application architecture patterns (complementary scope)
47+
* <<clean-architecture,Clean Architecture>> - Architectural style leveraging GoF principles
48+
====

skill/semantic-anchor-translator/references/catalog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ Source: https://github.com/LLM-Coding/Semantic-Anchors
8282
### SSOT (Single Source of Truth)
8383
- **Core:** One system is the master for specific data
8484

85+
### GoF Design Patterns
86+
- **Also known as:** Design Patterns, Gang of Four Patterns
87+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
88+
- **Core:** 23 patterns in 3 categories (Creational, Structural, Behavioral), pattern language, composition over inheritance, program to an interface
89+
8590
### Patterns of Enterprise Application Architecture (PEAA)
8691
- **Proponents:** Martin Fowler
8792
- **Core:** Repository, Unit of Work, Data Mapper, Active Record, etc.

0 commit comments

Comments
 (0)