Edocti
Advanced Technical Training for the Software Engineer of Tomorrow
Edocti Training

Design Patterns in Modern C++ (GoF)

Advanced
21 h
4.7 (91 reviews)
Design Patterns in Modern C++ (GoF)

Design Patterns in Modern C++: apply GoF and modern idioms for robust C++ design.

Hands-on practice with classic creational, structural and behavioral patterns.

Leverage C++11/14/17 features to simplify and modernize implementations.

Gain practical experience through labs refactoring and building extensible code.

How this helps: improve maintainability, readability and scalability of C++ apps.

Who it’s for: designed for individuals with C++ knowledge seeking better design.

Includes optional coverage of modern alternatives and anti-patterns.

Curriculum

Day 1 — Foundations & Creational patterns
  • OOP recap, SOLID and when patterns help vs. hurt
  • Modern C++ toolbox: RAII and smart pointers (unique_ptr, shared_ptr, weak_ptr); Move semantics and perfect forwarding; Type erasure and pimpl; Templates: partial specialization, SFINAE, Concepts, policy-based design; constexpr, consteval and compile-time computation; Ranges and views (C++20); std::variant/visit, std::optional, std::any; Coroutines (high-level overview)
  • UML essentials for patterns (class, object, relationships)
  • Factory Method — virtual constructors, registries, unique_ptr returns
  • Abstract Factory — families of products, object graphs, dependency injection
  • Builder — fluent APIs, immutability, assembling invariants
  • Prototype — cloning polymorphic objects; copy/move semantics and deep vs. shallow copy
  • Singleton — testability issues, threading, alternatives (object lifetime, DI containers)
Day 2 — Structural patterns
  • Adapter — object vs. class adapter; ranges-style adaptors; type erasure
  • Facade — stable API over subsystems; PIMPL to reduce rebuilds
  • Proxy — remote/virtual/protection proxies; lazy loading; caching
  • Decorator — composition over inheritance; value vs. reference semantics
  • Composite — tree models; iterators and visitors; value categories
  • Flyweight — intern pools; string views; arena allocators
  • Bridge — orthogonal dimensions; ABI stability; policy-based design
Day 3 — Behavioral patterns & refactoring
  • Strategy — static (templates/policies) vs. dynamic (type erasure/variant)
  • Observer — thread-safety, lock-free queues; signals/slots vs. callbacks
  • Command — undo/redo, macro commands; function objects and lambdas
  • State — table-driven vs. State pattern; variant + visit; transition safety
  • Template Method — CRTP alternatives; non-virtual interface (NVI)
  • Iterator — custom iterators, ranges; coroutines as generators (overview)
  • Mediator — decoupling complex interactions; events bus
  • Memento — snapshot strategies; serialization choices
  • Chain of Responsibility — pipelines; error handling with expected/variant
  • Interpreter — embedded DSLs; parsing choices
  • Visitor — acyclic visitor; std::variant visitation and pattern matching
  • Anti-patterns & smells — shotgun surgery, train wreck, god object
  • Refactoring lab — from ad-hoc code to clear patterns; measuring impact

Optional modules

Optional — Concurrency & async
  • Active Object and Reactor (conceptual) with std::jthread and executors
  • Coroutines for async flows; cancellation and timeouts (high level)

Course Day Structure

  • Part 1: 09:00–10:30
  • Break: 10:30–10:45
  • Part 2: 10:45–12:15
  • Lunch break: 12:15–13:15
  • Part 3: 13:15–15:15
  • Break: 15:15–15:30
  • Part 4: 15:30–17:30