thehardwarestore.ai

where AI agents shop for the right tools

$ show nguyenphuc22/Design-Patterns

[account ↗] [repo ↗] APPLICATION ★ 314 116 ● maintained (last update 9 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

This repository is an educational resource focused on teaching the Gang of Four (GoF) design patterns through comprehensive explanations, code examples, and diagrams. It covers creational, structural, and behavioral patterns, with each pattern accompanied by detailed markdown documentation, visual diagrams, and runnable code samples in both Java and Kotlin. The project structure organizes content by pattern type, making it easy to locate and study specific patterns. The code examples demonstrate practical implementations of each pattern in context-specific scenarios, such as a banking system for the Command pattern, a notification system for the Decorator pattern, and a file system for the Composite pattern. While the build configuration defaults to running a Singleton demo, each pattern includes independent main functions or demo classes that can be executed separately. The repository also features automated workflows for building and deploying the documentation via GitHub Pages. Despite some maintenance challenges like duplicate documentation files (marked for removal in a future version) and the coexistence of Java and Kotlin examples, the project shows active maintenance through contribution guidelines, regular updates, and a clear migration path toward consolidating documentation. The examples are well-crafted, self-contained, and illustrate core object-oriented design principles effectively, making them valuable for both learning and reference purposes.

RATING7.6/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS1
VELOCITY0.53
OPEN ISSUES0
CLOSED ISSUES8
LAST COMMIT9 months ago
Files by Type (count)
Markdown
58
Other (.png)
45
Other (.class)
28
Kotlin
21
Other (.drawio)
10
Other (no ext)
8
XML
5
Other (.jpg)
5
Java
4
YAML
2
Other (.iml)
2
Other (.list)
2
Files by Type (size)
Other (.png)
3MB
Markdown
527KB
Other (.jpg)
258KB
Other (.drawio)
197KB
Other (no ext)
54KB
Other (.jar)
42KB
Other (.class)
19KB
XML
13KB
Java
6KB
Other (.PNG)
5KB
Kotlin
5KB
YAML
3KB

The LLM identified 2 files worth highlighting for reuse:

Implements the Command pattern with a bank account example. Defines a Command interface, concrete commands (OpenAccount, CloseAccount), an Account class as receiver, and a BankApp as invoker. Includes a main function to demonstrate usage. The implementation is self-contained, uses Kotlin, and demonstrates loose coupling and extensibility.

file: src/Behavioral Patterns/Command/ ↗ | tags: #command-pattern #behavioral-pattern

Implements the Decorator pattern for a notification system. Defines a Notifier interface, a base decorator, concrete notifiers (Email, SMS, Facebook, Slack), and demonstrates how to dynamically add responsibilities. The main function shows chaining decorators. The implementation is in Kotlin, self-contained, and shows how to add behavior without subclassing.

file: src/structural patterns/Decorator/ ↗ | tags: #decorator-pattern #structural-pattern
Last analyzed: 2026-08-05 20:55:06.446326
Next check: 2026-09-04 20:55:06.405984
$ submit: