C++
developers, architects
2-3 days
lecture
workshop

GoF (Gang of Four) Design Patterns is one of the most popular subjects for programming trainings out there. Even though the original book used coding examples written in C++ and Smalltalk, those patterns are most useful in pure OO programming languages (like Java or C#).

This training provides an alternative approach to this subject. It teaches a long list of C++-specific idioms that are really useful in the every-day job and which are not included in GoF book. After that, it deeply covers the subjects of inheritance, polymorphism, and value semantics. In the end, it describes all of the GoF design patterns, presents their intended use cases and implementation, and confronts that with Modern C++ criticism and possible alternatives. Training includes the examples of correct and incorrect implementation of each pattern, and as part of the practical exercises, participants have the opportunity to learn about benefits and the consequences of using each of the approaches.

The training is targeted at intermediate developers who want to improve their skills in designing interfaces and proper classes interaction.

This course builds on top of the knowledge delivered in Advanced Modern C++ training so please consider requesting them in this order.

TRAINING HIGHLIGHTS

  • Emphasis on understanding different use cases of inheritance in C++ language and learning how to reuse this knowledge in your own code
  • Understanding of the differences between inheritance and polymorphism
  • Learning of different C++ idioms and patterns and their use cases
  • Special focus on the usage of "C++ templates" in practical tasks
  • Development of error-unfriendly code

TRAINING AGENDA

The following plan is an initial proposal of the training material. The final agenda is always created based on the individual pre-training analysis of client's requirements and restrictions.

  1. Advanced Modern C++ in a nutshell
    1. C++ Types
    2. Value Categories
    3. Name Lookup
    4. Range-based for loop
    5. Special Member Functions
    6. Exception Safety
    7. C++ template definition
    8. Template parameters
    9. Template specialization
    10. Structured binding
    11. std::variant
  2. Modern C++ Idioms
    1. Non-Copyable
    2. RAII
    3. Copy-and-swap
    4. Smart Pointer
    5. Type Traits
    6. Tag dispatch
    7. Policy-based design
    8. EBO
    9. Type Erasure
    10. SOO
    11. Copy-on-write
    12. CRTP
    13. Singleton
  3. Kinds of Inheritance
    1. Public inheritance
    2. Name hiding
    3. Virtual functions
    4. Pure virtual functions and abstract classes
    5. Interfaces
    6. Virtual Constructor Idiom
    7. Polymorphism and its types
    8. Double dispatch
    9. Private and protected inheritance
    10. Multiple inheritance
    11. RTTI
    12. Value vs Reference Semantics
    13. Concept-based Polymorphism
  4. GoF Design Patterns
    1. Criticism
    2. Creational Design Patterns
    3. Structural Design Patterns
    4. Behavioral Design Patterns
    5. Weak-points of "traditional" implementation
    6. Modern C++ ways to do it
C++
developers, architects
2-3 days
lecture
workshop

Trainer

Mateusz Pusz
OWNER / C++ TRAINER