Skip to content

mohammad-faqusa/design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

232 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Design Patterns Mastery – Java

Java OOP Design Patterns Status

Design Principles and Design Patterns in Java

This repository is my course-aligned progress log for a Udemy program focused on SOLID design principles and Java design patterns. It combines theory notes, hands-on exercises, UML assets, follow-along implementations, and my own practice projects under workplace/.

Certificate

What This Repository Covers

  • SOLID design principles in Java
  • 26 design patterns across creational, structural, and behavioral categories
  • Section-by-section notes and lecture breakdowns
  • Follow-along code from the course
  • Standalone practice projects in workplace/
  • Reference material in resources/

Repository Map

Progress Snapshot

Area Coverage in repo Practice status
SOLID 5/5 principles with theory and hands-on folders 5/5 workplace projects
Creational 7/7 patterns with dedicated section coverage 7/7 workplace projects
Structural 7/7 patterns with dedicated section coverage 4/7 workplace projects currently present
Behavioral 12/12 patterns represented across the repo Dedicated workplace project for Chain of Responsibility; later patterns are tracked inside their section folders

How The Pattern Sections Are Organized

Most pattern folders follow a repeatable study flow:

  1. Introduction
  2. Implementation steps
  3. Example UML
  4. Implementation
  5. Design considerations
  6. Example or real-world usage
  7. Comparison with a similar pattern
  8. Pitfalls
  9. Summary

That makes this repository useful both as a progress archive and as a quick revision reference.

Topic Dictionary

Overview links:

SOLID Principles

Topic Locations Practice Outcome
Single Responsibility Principle theory, hands-on 001SingleResponsibility Separate responsibilities so each class has one clear reason to change.
Open-Closed Principle theory, hands-on 002OpenClosed Extend behavior through abstraction instead of editing stable code paths.
Liskov Substitution Principle theory, hands-on 003Liskove Preserve contracts so subtypes can safely replace base types.
Interface Segregation Principle theory, hands-on 004InterfaceSegregation Split broad interfaces into smaller client-focused contracts.
Dependency Inversion Principle theory, hands-on 005DIP Depend on abstractions so high-level policy is decoupled from low-level details.

Creational Patterns

Topic Locations Practice Outcome
Builder section-4-builder 006Builder Build complex objects step by step without telescoping constructors.
Simple Factory section-5-simple-factory 007SimpleFactory Centralize simple object-creation logic behind one entry point.
Factory Method section-6-factory-method 008FactoryMethod Delegate creation to specialized creators while keeping clients generic.
Prototype section-7-prototype 009Prototype Clone preconfigured objects when copying is simpler than rebuilding.
Abstract Factory section-8-abstract-factory 010AbstractFactory Create compatible families of related objects without tying code to concrete classes.
Singleton section-8-singleton 011Singleton Control single-instance lifecycle and global access patterns more deliberately.
Object Pool section-8-singleton 012ObjectPool Reuse expensive objects and manage limited shared resources efficiently.

Structural Patterns

Topic Locations Practice Outcome
Adapter section-12-adapter 013Adapter Make incompatible interfaces collaborate without rewriting existing classes.
Bridge section-13-bridge 014Bridge Decouple abstraction from implementation so both can evolve independently.
Decorator section-14-decorator 015Decorator Add behavior dynamically without subclass explosion.
Composite section-15-composite 016Composite Treat single objects and object trees through a unified interface.
Facade section-16-facade - Hide subsystem complexity behind a simpler API.
Flyweight section-17-flyweight - Share intrinsic state to reduce object count and memory pressure.
Proxy section-18-proxy - Add indirection for access control, lazy loading, or remote behavior.

Behavioral Patterns

Topic Locations Practice Outcome
Chain of Responsibility 017ChainOfResponsibility, reference code 017ChainOfResponsibility Pass requests through a chain of handlers until one can process them.
Command section-21-command - Encapsulate actions as objects so they can be queued, logged, or undone.
Interpreter section-22-interpreter - Represent grammar rules as objects and evaluate expressions cleanly.
Mediator section-23-mediator - Centralize collaboration rules instead of coupling UI or domain objects directly.
Iterator section-24-iterator - Traverse collections without exposing internal structure.
Memento section-25-memento - Capture and restore object state without breaking encapsulation.
Observer section-26-observer - Publish state changes to interested subscribers in a decoupled way.
State section-26-state - Move state-specific behavior out of condition-heavy objects.
Strategy section-28-strategy - Swap algorithms at runtime behind a stable interface.
Template Method section-29-template-method - Define an algorithm skeleton and vary only selected steps.
Visitor section-30-visitor - Add new operations across an object structure without editing each element class.
Null Object section-31-null-object - Replace repetitive null checks with neutral, safe behavior.

Main Learning Outcomes

  • I practiced refactoring Java code toward SOLID principles instead of only memorizing definitions.
  • I built or followed implementations for classic GoF patterns and compared them with similar alternatives.
  • I used UML, examples, pitfalls, and comparison notes to understand when a pattern should or should not be used.
  • I turned the course into a reusable reference library for revision, interview prep, and future project work.

Notes About The Folder Naming

  • Some section numbers mirror how the course material was exported, so numbering is not perfectly sequential.
  • section-8-singleton contains both Singleton and Object Pool materials.
  • Behavioral coverage includes a dedicated workplace project for Chain of Responsibility, while the later behavioral patterns are organized as section folders.

Why This README Exists

I wanted this repository to be more than a dump of course files. The goal is to keep it usable as a personal knowledge base: a place where I can quickly find the topic, open the related notes, jump to code, and remember what I learned from each principle or pattern.

About

java design patterns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors