Fast lookup
Use it when you need a quick reminder of what each family is trying to solve.
This cheatsheet is designed as a compact decision aid. It is not a substitute for the detailed pages. Its job is to help you map a recurring design force to a likely pattern family and then route you toward the right page for deeper judgment.
Java teams often need a lightweight reference during design or code review. A concise cheatsheet helps keep pattern discussions grounded without forcing the team into long catalog digressions.
A good cheatsheet should shorten orientation time without pretending that judgment can be reduced to one line. That is why this page groups patterns by category, highlights the core force each one addresses, and points toward nearby alternatives that are easy to confuse.
For Java developers, this is useful in architecture reviews, team design sessions, and refactoring work where you need a shared starting point before discussing specifics.
Use the cheatsheet to get oriented, then move into the detailed page when the choice starts to matter concretely.
Use it when you need a quick reminder of what each family is trying to solve.
It is especially useful when several patterns sound similar on the surface.
Cheatsheets help you orient quickly, then deeper pages help you choose responsibly.
package org.javaomnibus.ecommerce.gof;
public final class PatternPressureExamples {
PaymentGateway gatewayFor(String paymentMethod) { return null; }
Money discountFor(Order order) { return null; }
ShipmentWorkflow workflowFor(Order order) { return null; }
}
| Pattern | Family | Best-fit force | Easy confusion |
|---|---|---|---|
| Factory Method | Creational | Conditional creation of one product family | Abstract Factory, Builder |
| Abstract Factory | Creational | Creating matching product families together | Factory Method, Builder |
| Builder | Creational | Multi-step construction with readable assembly | Factory Method, Prototype |
| Prototype | Creational | Cloning configured objects | Builder, Flyweight |
| Strategy | Behavioral | Swappable algorithm or policy variation | State, Command |
| State | Behavioral | Behavior changing by lifecycle state | Strategy, Command |
| Adapter | Structural | Interface mismatch | Facade, Proxy |
| Decorator | Structural | Optional layered behavior | Proxy, Composite |
Cheatsheets can oversimplify. They are most useful when they help you narrow the field, not when they are treated as the final decision.