Creational pack
Factory Method, Abstract Factory, Builder, Prototype, and Singleton examples around domain object creation.
This page organizes a practical source-code study pack for GoF patterns using the same order-management domain used throughout the vertical. The goal is to make comparative study easier: you should be able to see how Strategy, Adapter, Builder, State, Decorator, and others look when they live in the same conceptual world.
Developers often understand patterns faster when they can compare multiple examples side by side in one domain model. This page acts as a download-style index and study plan for building or reviewing a reusable source pack.
The recommended layout groups examples by family and keeps one shared domain package for common types such as Order, Payment, Shipment, and Notification. That way the patterns feel like alternative design moves inside one product instead of isolated classroom sketches.
Factory Method, Abstract Factory, Builder, Prototype, and Singleton examples around domain object creation.
Adapter, Facade, Decorator, Proxy, Bridge, and Composite in realistic integration and UI-support scenarios.
Strategy, State, Command, Observer, Template Method, and related examples tied to workflows and policies.
org.javaomnibus.examples.gof
├── common
│ ├── order
│ ├── payment
│ ├── shipment
│ └── notification
├── creational
├── structural
└── behavioral
package org.javaomnibus.examples.gof.common.order;
public record OrderId(String value) {}
public record OrderLine(String productCode, int quantity) {}