Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dizzydroid/designpatternsnutshell

Example code used in my handbook, Design Patterns in a Nutshell
https://github.com/dizzydroid/designpatternsnutshell

design-patterns design-patterns-implemented-in-java example-code handbook java reference software-engineering

Last synced: 1 day ago
JSON representation

Example code used in my handbook, Design Patterns in a Nutshell

Awesome Lists containing this project

README

        



DesignPatternsNutshell Logo

Design Patterns in a Nutshell


Welcome to the **Design Patterns in a Nutshell** repository! This repository is a companion to the handbook _Design Patterns in a Nutshell_ and is designed to provide practical, runnable examples for each pattern discussed. Whether you're a beginner or a seasoned developer, you'll find this resource invaluable for mastering design patterns.

## πŸ“‚ Repository Structure

The repository is neatly organized into three main folders, corresponding to the **three families** of design patterns. Each pattern links directly to its folder and example:

### **1. Creational Patterns** [(`/Creational Patterns`)](./Creational%20Patterns)
Focus on object creation mechanisms, increasing flexibility and reuse:
- [Singleton](./Creational%20Patterns/singleton)
- [Factory Method](./Creational%20Patterns/factory-method)
- [Abstract Factory](./Creational%20Patterns/abstract-factory)
- [Builder](./Creational%20Patterns/builder)
- [Prototype](./Creational%20Patterns/prototype)
- [Object Pool](./Creational%20Patterns/object-pool)

### **2. Structural Patterns** [(`/Structural Patterns`)](./Structural%20Patterns)
Deal with the composition of classes and objects to form larger structures:
- [Adapter](./Structural%20Patterns/adapter)
- [Proxy](./Structural%20Patterns/proxy)
- [Decorator](./Structural%20Patterns/decorator)
- [Flyweight](./Structural%20Patterns/flyweight)
- [Composite](./Structural%20Patterns/composite)
- [Bridge](./Structural%20Patterns/bridge)
- [Façade](./Structural%20Patterns/facade)

### **3. Behavioral Patterns** [(`/Behavioral Patterns`)](./Behavioral%20Patterns)
Concerned with algorithms and object interaction:
- [Template Method](./Behavioral%20Patterns/template-method)
- [Observer](./Behavioral%20Patterns/observer)
- [State](./Behavioral%20Patterns/state)
- [Command](./Behavioral%20Patterns/command)
- [Mediator](./Behavioral%20Patterns/mediator)
- [Visitor](./Behavioral%20Patterns/visitor)
- [Strategy](./Behavioral%20Patterns/strategy)
- [Chain of Responsibility](./Behavioral%20Patterns/chain-of-responsibility)
- [Iterator](./Behavioral%20Patterns/iterator)

---

## ✨ Highlights

- **Practical Examples:** Fully runnable code for every pattern.
- **Embedded UML Diagrams:** Each pattern's markdown file includes a clear UML diagram for easy visualization.
- **Beginner-Friendly:** Simple explanations and real-world use cases.

---

## 🎯 Goals of the Repository

- Serve as a **reference** for understanding and implementing design patterns.
- Provide a **hands-on approach** to supplement theoretical learning.
- Offer **quick access** to runnable examples and diagrams for every pattern.

---

## πŸ“š Get the Handbook
This repository is a companion to the [Design Patterns in a Nutshell](https://drive.google.com/file/d/19qE0GULc0QBZ7pHO0XIFj_GkTRuBpd5v/view) handbook.

---

## πŸ“œ License

This repository is owned by **Shehab Mahmoud**. All content is protected under the terms of intellectual property. Refer to the [`LICENSE`](./LICENSE) file for additional details.

---

## ⚠ Disclaimer
This handbook includes content from third-party sources, including images and text excerpts.
Such content remains the property of their respective owners and is included here under
applicable licenses or fair use. If you are the owner of any content and believe it has been
used without proper permission, please contact us to resolve the issue.

---

## 🀝 Contributions

Contributions are welcome! If you’d like to suggest improvements, add examples, or fix bugs:
- Open an issue or submit a pull request.
- Refer to the [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

---


Happy learning and coding! πŸš€