Skip to content

Rewrite the documentation with an academic tone and references - #27

Merged
lpenap merged 1 commit into
masterfrom
lpenap/documentation
Sep 16, 2026
Merged

lpenap merged 1 commit into
masterfrom
lpenap/documentation

Conversation

@lpenap

@lpenap lpenap commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

Documentation pass over the whole repository.

Main README

  • Abstract, table of contents, quickstart with the console-runner option
  • Catalogue split into creational, structural, behavioural patterns and concurrency constructs, each with a one-line intent
  • Design of the host application: package tree, discovery by type, output through Logback and OutputSink, configuration binding, constructor injection, threading
  • Building and quality gates: tool table, JaCoCo thresholds, both CI services and what each does
  • Step-by-step guide to adding a new example, plus the documentation conventions every pattern README follows
  • Related projects section pointing to java-monitor-example as the companion for the monitor construct
  • General references

Pattern READMEs (11)
Each follows the same outline adapted from Gamma et al.: intent (quoted with page reference), motivation, structure (existing diagram and PlantUML kept), participants table mapping canonical roles to the classes in the package, the example's expected output, consequences, related patterns, numbered references. Notable additions:

  • Singleton: explains why the textbook lazy initialisation is not thread-safe and lists the correct Java alternatives with sources (JLS, Bloch, Goetz, Manson/Pugh/Adve, DCL declaration)
  • Producer/Consumer: traces the bounded-buffer problem to Dijkstra 1965, Hoare 1974 and Brinch Hansen 1973, explains how LinkedBlockingDeque realises a monitor, and links to java-monitor-example for the hand-written synchronized/wait/notifyAll version
  • Factory: positioned honestly as the Simple Factory idiom rather than a GoF pattern
  • Factory Method: notes that the reduced example collapses the product hierarchy to a value and maps GenericProduct to the Creator role
  • Observer: JavaBeans PropertyChangeSupport, the deprecation of java.util.Observable, and the suppressed-event subtlety the test works around

Code

  • Two typo fixes in log output: "ConcretepProduct" (and its test) and "Instanciating"

Verification

  • ./mvnw clean verify green, 39 tests
  • Script-checked every relative link and in-page anchor across the 12 READMEs: 0 broken

🤖 Generated with Claude Code

The main README now describes the project as teaching material: a
categorised catalogue of the patterns, the design of the host
application and how examples are discovered and displayed, the build
and quality gates including both CI services, a step-by-step guide to
adding an example, the documentation conventions each pattern README
follows, and a pointer to the companion java-monitor-example project.

Each pattern README follows the same outline adapted from Gamma et al.:
intent, motivation, structure, a participants table mapping the
canonical roles to the classes in the package, the example's expected
output, consequences, related patterns and numbered references. The
Singleton README documents why the textbook lazy initialisation is not
thread-safe and the correct Java alternatives; the Producer/Consumer
README traces the problem to Dijkstra, Hoare and Brinch Hansen and
explains how BlockingQueue realises a monitor, linking to the companion
project for the hand-written version.

Also fixes two typos in log output: "ConcretepProduct" and
"Instanciating".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@lpenap
lpenap merged commit a43865c into master Sep 16, 2026
3 checks passed
@lpenap
lpenap deleted the lpenap/documentation branch September 16, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant