Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Creational Design Patterns in Modern C++

Packt via Coursera

Overview

This course provides a comprehensive exploration of creational design patterns in modern C++. Starting with the fundamental S.O.L.I.D. principles, it prepares you with a strong foundation in design. You will then dive into patterns such as Singleton, where you'll learn about lazy instantiation, thread safety, and common issues, while the Factory Method and Abstract Factory patterns are broken down to highlight their power in managing object creation complexity. As you progress, the course presents more advanced topics like the Object Pool and Prototype patterns, helping you understand how to optimize memory usage and object duplication. Each pattern is paired with real-world examples and modern C++ techniques, ensuring you not only understand the theory but can also apply the patterns in practical scenarios. You'll also explore alternative design solutions like the Monostate pattern and strategies for improving flexibility in software architecture. By the end of the course, you will have an in-depth understanding of how to use creational patterns to solve complex design problems in a systematic and efficient way. This course equips you with the tools and knowledge to write better code by leveraging the power of creational design patterns in modern C++. This course is designed for intermediate to advanced C++ developers who have a working knowledge of object-oriented programming and want to enhance their understanding of design patterns. Familiarity with C++ and later versions is required.

Syllabus

  • Introduction
    • In this module, we will explore the foundational concepts of software design, starting with an introduction to the course and progressing through key principles and patterns. We’ll cover the basics of the Unified Modeling Language (UML), dive into the S.O.L.I.D. design principles, and introduce creational patterns that set the stage for more advanced discussions.
  • Singleton
    • In this module, we will dive deep into the singleton design pattern, exploring its basic implementation and common use cases. We’ll tackle advanced topics such as lazy instantiation, multithreading challenges, and alternative designs like the monostate pattern. Additionally, we'll cover real-world examples, and registry patterns, and evaluate when to use singleton effectively in your applications.
  • Factory Method
    • In this module, we will explore the factory method design pattern, covering its structure and basic implementation. You'll learn how to apply it in different contexts, including application frameworks and parameterized approaches. We’ll also discuss how to integrate memory management with smart pointers and analyze the advantages and trade-offs of using the factory method.
  • Object Pool
    • In this module, we will explore the object pool design pattern, focusing on its structure and practical applications. You will learn how to implement pooling for game objects and multiple actors, as well as create a flexible, generic object pool. Through examples, we’ll cover advanced topics such as reducing dependencies and optimizing memory allocation, helping you decide when and how to use object pooling effectively.
  • Abstract Factory
    • In this module, we will explore the abstract factory design pattern, starting with its intent and structure. You’ll learn to apply it by refactoring basic examples and implementing it in a database framework with SQL Server and MySQL classes. We’ll also cover advanced usage, integrating it with the factory method, and discuss the pros and cons to help you determine when to use the abstract factory in your designs.
  • Prototype
    • In this module, we will explore the prototype design pattern, focusing on its intent and how it facilitates object cloning. You will learn how to apply the pattern through practical examples, including game development scenarios. We’ll address the difference between shallow and deep copies, handle varying object states, and develop a prototype manager. Lastly, we’ll explore memory management optimizations using smart pointers and evaluate when the prototype pattern is most beneficial in software design.
  • Builder
    • In this module, we will explore the builder design pattern, focusing on its intent and structure. You will learn how to implement the builder pattern through practical examples, such as refactoring a file class to resolve design issues. We will also cover advanced topics like modern builder approaches and the fluent interface. By the end, you’ll be able to assess when and how to effectively use the builder pattern in your projects.

Taught by

Packt - Course Instructors

Reviews

Start your review of Creational Design Patterns in Modern C++

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.