Learning Resources
This module is populated from the local chunked books in library/raw/semester-03-software-design/books and a small set of validated external links. Use this page as a source map, not as an instruction to read everything.
Source Stack
| Book | Role | How to use it in this module |
|---|---|---|
| Head First Design Patterns | Primary teaching source | First stop when a pattern's intent or "what problem does this solve" is unclear. Narrative style, many worked examples. |
| Design Patterns (GoF) | Canonical reference | Go here for the canonical vocabulary, applicability lists, and sample code. Precise but dense. |
| Refactoring (Fowler) | Selective support | Use when the question is "how do I get there from here safely." Move-by-move mechanics. |
| Clean Code (Martin) | Selective support | Best short chapter on systems, dependency injection, and construction boundaries. |
| Good Code, Bad Code (Tom Long) | Judgment support | Use when weighing inheritance vs composition, interface vs concrete class, or "should we add a pattern here." |
| OOAD (Dennis de Champeaux et al.) | Background only | Open only when you want a second angle on inheritance, responsibility distribution, or hierarchy design. |
Resource Map by Cluster
Cluster 1: Creational -- Construction Flexibility
| Need | Best local chunk | Why |
|---|---|---|
| first pass on factories | Head First: The Factory Pattern (chapter intro) | Best narrative introduction to why new is sometimes a problem |
| simple factory (non-GoF) | Head First: The Simple Factory Defined | Clears up the terminology before Factory Method |
| Factory Method canonical | GoF: Factory Method -- Applicability, Implementation | Canonical conditions under which the pattern earns its cost |
| Factory Method narrative | Head First: Factory Method Pattern Defined | Strongest "why does this exist" explanation |
| dependency direction | Head First: Looking at Object Dependencies, Applying the Principle | Dependency Inversion framing that explains factories in the large |
| Abstract Factory intent | GoF: Abstract Factory -- Intent, Implementation, Sample Code | Canonical family-of-products treatment |
| Abstract Factory narrative | Head First: Families of Ingredients, Revisiting Our Pizza Stores, Abstract Factory Defined | Walks through the transition from Factory Method to Abstract Factory |
| Builder applicability | GoF: Builder -- Applicability, Sample Code | When the pattern is justified; canonical shape |
| fluent Builder in practice | Good Code, Bad Code: The Builder Pattern | Modern fluent Builder, immutability, and validation in build() |
| replace constructor | Refactoring: Replace Constructor with Factory Function | The refactor that often introduces a Builder or factory function |
| Prototype | GoF: Prototype -- Applicability, Sample Code | Canonical treatment; keep it brief |
| Singleton canonical | GoF: Singleton -- Implementation, Sample Code | Canonical shape; read the critiques elsewhere |
| Singleton narrative | Head First: The Singleton Pattern, Dissecting the Classic Singleton | Thread-safety, caveats, real-world problems |
Cluster 2: Structural -- Interface Bridging
| Need | Best local chunk | Why |
|---|---|---|
| structural chapter overview | GoF: 4. Structural Patterns | Frames what "structural" means before the patterns |
| Adapter canonical | GoF: Adapter -- Applicability, Sample Code | Canonical applicability and object vs class adapter |
| Adapter narrative | Head First: The Adapter and Facade Patterns, How the Client Uses the Adapter, Object and Class Adapters, Enumeration-Iterator Adapter | Best-narrative walk from mismatch to adapter, with a real Java example |
| Facade canonical | GoF: Facade -- Participants, Known Uses | Canonical roles and where the pattern appears in practice |
| Facade narrative | Head First: Lights, Camera, Facade, Facade Pattern Defined | Intuition-first treatment with the home-theater example |
| Bridge | GoF: Bridge -- Intent, Participants, Sample Code, Known Uses | Only deep source for Bridge; read sequentially |
Cluster 3: Structural -- Composition and Layering
| Need | Best local chunk | Why |
|---|---|---|
| Composite canonical | GoF: Composite -- Implementation, Sample Code, Known Uses | Canonical form, leaf/composite trade-offs, applied examples |
| Composite narrative | Head First: The Composite Pattern Defined, Designing Menus with Composite | Best safety-vs-transparency discussion |
| Decorator narrative | Head First: The Open/Closed Principle, Meet the Decorator Pattern, New Barista Training, Coding Condiments, Real-World Java I/O | Strongest pedagogical walk-through, including a real-world Java I/O example |
| Decorator canonical | GoF: Decorator -- Implementation, Sample Code | Canonical shape |
| Proxy narrative | Head First: The Proxy Pattern, Remote Proxy, Virtual Proxy, Album Cover Virtual Proxy, Protection Proxy | Covers all three major proxy kinds with examples |
| Proxy canonical | GoF: Proxy -- Implementation, Sample Code | Canonical shape and trade-offs |
Cluster 4: Pragmatic Pattern Selection
| Need | Best local chunk | Why |
|---|---|---|
| category map | GoF: 1.5 Organizing the Catalog | Where the creational / structural / behavioral split actually comes from |
| selection algorithm | GoF: 1.7 How to Select a Design Pattern | Canonical checklist |
| design for change | GoF: Designing for Change (Part 1), (Part 2) | The force-driven view; what patterns are for |
| patterns in real code | Head First: Better Living with Patterns, May the Force Be with You (1), May the Force Be with You (2), Organizing Patterns, Thinking in Patterns, Cruisin' Objectville with the GoF, The Patterns Zoo | Long section on applying patterns with taste, avoiding cargo-cult |
| inheritance alternatives | GoF: Class Versus Interface Inheritance, Putting Reuse Mechanisms to Work, Delegation | Classic "favor composition" argument, in GoF's own voice |
| composition over inheritance | Good Code, Bad Code: Class Inheritance Can Be Problematic, Use Composition | Modern restatement with concrete refactors |
Cluster 5: Dependency Injection and Composition Roots
| Need | Best local chunk | Why |
|---|---|---|
| dependency injection primer | Clean Code: Chapter 11 -- Systems | The clearest short chapter on DI and separation of construction |
| DI in practice | Good Code, Bad Code: Design with Dependency Injection in Mind | Modern example-driven treatment |
External Resources (Validated)
- refactoring.guru, Creational Patterns -- high-quality illustrated summaries of Factory Method, Abstract Factory, Builder, Prototype, Singleton.
- refactoring.guru, Structural Patterns -- same series for Adapter, Facade, Bridge, Composite, Decorator, Proxy, Flyweight.
- Mark Seemann (blog.ploeh.dk), Composition Root -- canonical short definition of the pattern.
- Mark Seemann (blog.ploeh.dk), DI-Friendly Framework -- distinguishes pure DI from container DI.
- Martin Fowler, Inversion of Control Containers and the Dependency Injection pattern -- original vocabulary; read once for orientation.
- Steve Yegge, Execution in the Kingdom of Nouns -- cautionary tale on noun-obsession and creational overuse; read for the cargo-cult concept.
Use Rules
- If you are stuck on what the pattern is for, go to Head First Design Patterns first.
- If you need a precise definition or the canonical participants, go to Design Patterns (GoF).
- If the question is "how do I get there safely from this code," go to Refactoring.
- If the question is "should I even add this," go to Good Code, Bad Code or Clean Code.
- Open one chunk for one concept gap; do not wander through a whole chapter sequence by default.
- External links are validated; use them only after the local sources have not answered the question in ten minutes.