This repository contains my personal practice and code examples developed while studying the book "Head First Design Patterns" by Eric Freeman & Elisabeth Robson (2nd Edition).
- Written from scratch: None of the code in this repository is a blind copy-paste. Every pattern was thoroughly analyzed and then written entirely from scratch based on my own understanding of the logic.
- Focus on deep understanding: By implementing the examples independently without looking at the book's exact source code, I focused on building muscle memory and deeply internalizing object-oriented design principles.
- Isolated drafts: Each folder acts as an independent mini-project or draft focused on a specific Design Pattern from the book.
- Language: Java
- IDE / Editor: Visual Studio Code
The project is structured into folders representing specific concepts and patterns from the book:
Strategy— Encapsulating interchangeable behaviors.Observer/Smart Home— Implementing loose coupling between objects.Decorator— Attaching additional responsibilities to an object dynamically.Abstract Factory/Pizza— Creating families of related objects without specifying concrete classes.Command/Home Controller— Encapsulating a request as an object to decouple components.- ...and other folders covering key object-oriented design principles and guidelines.