Back to Basics: Designing Classes (part 1 of 2)
summary
Argues that class design becomes manageable by extracting actual variation points and showing concrete refactor steps: replace sprawling inheritance with the strategy design pattern, use the non-virtual interface (NVI) / template‑method to keep caller APIs stable, prefer value semantics or function objects over raw owning pointers and apply RAII with the rule of zero. Demonstrations use unique_ptrs, callable objects and templates, measure reduced duplication, shallower hierarchies, and easier extension without breaking callers.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 0:50Expectations
- 2:37Dependencies
- 5:41Naming
- 8:39Change and Extension
- 9:13Shape Hierarchy
- 13:15Inheritance
- 15:00Design Principles
- 26:15Design classes for easy change
- 27:35Design styles
- 29:40Template method
- 38:35Testability
- 44:33Implementation Guidelines
- 54:31Questions
related talks
15mYou Might Not Need Classes
57mDesign Patterns - The Most Common Misconceptions (2 of N)
01h 03mBreaking Dependencies: The SOLID Principles
40mBarely Enough Design
48mThe Back(side) of the Class
54mStarting at the Beginning (of Design)
01h 02m“Modern C++ Design (part 1 of 2)”
31mFramework Design - Lessons Learned from Repeated Mistakes
