Skip to content

Glossary: Software Design Patterns in Java

Composition root

The one place in a program, usually `main`, that builds the real parts and passes them to the code that needs them. Keeping all this wiring in one spot lets the rest of the code receive its dependencies and stay easy to test.

Where the book teaches it

Related terms

Dependency injectionConstructor injection