Booking options
£14.99
£14.99
On-Demand course
7 hours 42 minutes
All levels
This course will help you become familiar with the implementation of creational design patterns. Featuring real-world examples written in modern C++, each pattern is explained in detail to help you to understand how the pattern can be implemented efficiently using language features.
The best way to solve common object-oriented design problems is by implementing design patterns. However, understanding and learning design patterns can be time-consuming and intimidating, but this course has got you covered! With Creational Design Patterns in Modern C++, you'll learn how to understand and implement creational design patterns in C++ with the help of engaging examples.
The course begins with an introduction to creational patterns, giving you a tour of UML class diagrams and SOLID principles. You'll become familiar with logger classes, multithreading, and patterns and gain a solid understanding of singletons in C++. As you progress, you'll get to grips with the factory method and find out how to implement it in the application framework. Once you've covered the intent, structure, and implementation of the object pool pattern, you'll discover how to use the abstract factory pattern. Finally, you'll delve into prototype implementation with the help of a gaming example and apply the builder pattern.
By the end of this course, you'll have developed skills needed to create and implement patterns in modern C++. The code bundle for this course is available at https://github.com/PacktPublishing/Creational-Design-Patterns-in-Modern-C-plus-plus
Implement singleton in C++ with thread-safety
Use the factory method to encapsulate the construction process
Avoid repetitive construction with object pool pattern
Control the construction process of an object using the builder design pattern
Clone expensive objects with the prototype pattern
Construct objects based on a context using abstract factory
Whether you are new to design patterns or an experienced software or C++ developer or a project manager who wants to implement creational design patterns using modern C++, this course is for you. Basic knowledge of C++ and object-oriented programming is necessary to get started with this course.
Using a practical approach, this video course will equip you with the skills you need to create and implement design patterns. With the help of real-world examples written in modern C++, you'll understand and implement creational design patterns in no time.
Become familiar with creational design patterns * Solve object construction problems with creational design patterns * Understand the role of C++ in implementing design patterns
https://github.com/PacktPublishing/Creational-Design-Patterns-in-Modern-C-plus-plus
Umar Lone is a civil engineer who found his calling in software development. He started teaching C++ and Visual C++ 15 years ago. Currently, he trains software professionals in various software companies in India in different technologies, such as modern C++, advanced C++, STL, design patterns, Android, Unity, Linux, and more. He is extremely passionate about teaching and has trained more than 20,000 software professionals. An avid gamer, Umar is currently trying his hand at game development in Unity and Unreal. He has a few Android applications to his credit, including one on design patterns. The only thing he likes more than C++ is Modern C++.
1. Introduction
1. Course Introduction This video provides an introduction to the course. |
2. Introduction to Patterns This video explains the concept of patterns. |
3. Overview of the Unified Modeling Language (UML) Class Diagram This video provides an overview of the UML class designs. |
4. S.O.L.I.D. Principles - Part I This video is the first part of the three-part video that highlights the S.O.L.I.D. principles and explains the Single Responsibility and the Open-Closed principles. |
5. S.O.L.I.D. Principles - Part II This video is the second part of the three-part video that explains the Liskov Substitution principle. |
6. S.O.L.I.D. Principles - Part III This video is the third part of the three-part video that explains the Interface Segregation and Depending Inversion principles. |
7. Creational Patterns - Overview This video provides an overview of the creational patterns. |
2. Singleton
1. Introduction This video explains the intent of patterns and their basic implementation. |
2. Basic Example This video demonstrates a simple implementation of the singleton pattern. |
3. Logger Class - Part I This video is the first part of the two-part video that highlights the issues in a class and explains why it needs to be a singleton. |
4. Logger Class - Part II This video is the second part of the two-part video that demonstrates how to refactor a logger to a singleton. |
5. Lazy Instantiation This video demonstrates how to perform a lazy instantiation. |
6. Destruction Policies This video highlights the issues with the lazy instantiation and demonstrates how to resolve them. |
7. Multithreading Issues This video demonstrates how to solve the problem of using a singleton in a multithreading application. |
8. Why a Double-Checked Locking Pattern (DCLP) Fails? This video explains how a DCLP can fail in some scenarios. |
9. Meyer's Singleton This video demonstrates how to implement the Meyer's singleton. |
10. Using the std::call_once Function This video demonstrates how to use the std::call_once function. |
11. CRTP Idiom This video demonstrates how to use the CRTP idiom to implement a singleton class through inheritance. |
12. Clock Class This video highlights an example that does not require a singleton implementation for singularity. |
13. Monostate Pattern This video explains the monostate pattern and demonstrates how to implement it. |
14. Singleton Versus Monostate This video demonstrates how to compare singleton and monostate and, thus, decide which one to use in the appropriate situation. |
15. Singleton Issues This video highlights the issues with singleton. |
16. Registry of Singletons - Part I This video is the first part of the two-part video that demonstrates how to implement a registry of singletons. |
17. Registry of Singletons - II This video is the second part of the two-part video that demonstrates how to implement the registry using a lazy instantiation. |
18. Pros and Cons This video highlights the pros and cons of the singleton design patterns. |
3. Factory Method
1. Introduction This video focuses on the factory method, its intent, and its structure. |
2. Basic Implementation - Part I This video is the first part of the two-part video that explains the factory method design pattern with a basic example. |
3. Basic Implementation - Part II This video is the second part of the two-part video that demonstrates how to implement the factory method used in the previous example. |
4. Application Framework - Discussion This video explains the framework needed to implement the factory method. |
5. Application Framework - Implementation This video highlights the issues with the design and demonstrates how to implement the application framework without the pattern. |
6. Application Framework with the Factory Method This video demonstrates how to implement the factory method in the application framework. |
7. Parameterized Factory Method This video explains an alternative implementation of the factory method. |
8. std::unique_ptr This video highlights the examples explaining how and why a factory method can be implemented as a global function and focuses on the std::unique_ptr function. |
9. std::shared_ptr This video demonstrates how to use the factory method as functions and focuses on the std::shared_ptr function. |
10. Pros and Cons This video highlights the pros and cons of the factory method and explains when to apply it. |
4. Object Pool
1. Introduction This video explains the intent, structure, and implementation of the object pool pattern. |
2. Basic Example This video presents a simple example of the pattern. |
3. Pooling Game Objects - Part I This video is the first part of the two-part video that explains the benefits of pooling a large number of game objects. |
4. Pooling Game Objects - Part II This video is the second part of the two-part video that demonstrates how to use pooling for the Missile class objects. |
5. Multiple Actors - Part I This video is the first part of the three-part video that demonstrates how to update the example to support multiple types of actors. |
6. Multiple Actors - Part II This video is the second part of the three-part video that demonstrates how to use the acquire and release methods. |
7. Multiple Actors - Part III This video is the third part of the three-part video that demonstrates how to reduce dependency on the concrete classes through a factory. |
8. Generic Pool - Part I This video is the first part of the two-part video that demonstrates how to create a generic object pool that can work with any class. |
9. Generic Pool - Part II This video is the second part of the two-part video that demonstrates how to improve the implementation with a custom allocator. |
10. Pros and Cons This video highlights the pros and cons of the object pool pattern and explains when to use it. |
5. Abstract Factory
1. Introduction This video introduces you to the abstract factory pattern, its intent, and its structure. |
2. Basic Example This video highlights a simple example that will be implemented later with the abstract factory. |
3. Basic Implementation with the Abstract Factory This video demonstrates how to modify and refactor the previous example to use the abstract factory. |
4. Database Framework - Introduction This video highlights an example that will be used to explain the abstract factory pattern. |
5. Database Framework - Implementation This video demonstrates how to implement the database framework in your application. |
6. SQL Server Database Classes This video demonstrates how to add the SQL server database classes and explains their usage. |
7. MySQL Database Classes This video explains the MySQL database classes. |
8. Database Framework Usage This video highlights the macros and conditional statements. |
9. Using the Factory Method This video demonstrates how to use the factory method design pattern. |
10. Using the Abstract Factory This video demonstrates how to refactor the database framework to use the abstract factory design method. |
11. Pros and Cons This video highlights the pros and cons of this pattern and when to use it. |
6. Prototype
1. Introduction This video introduces you to the pattern and its intent. |
2. Cloning Types This video explains the basics of cloning and demonstrates how to use the prototype pattern to implement it. |
3. Basic Example This video demonstrates how to implement the prototype pattern with a basic example. |
4. Game - Introduction This video highlights an example used for the prototype design pattern. |
5. Game Implementation - Part I This video is the first part of the six-part video that demonstrates how to add the animation and vehicle classes. |
6. Game Implementation - Part II This video is the second part of the six-part video that demonstrates how to add the vehicle subclasses. |
7. Game Implementation - Part III This video is the third part of the six-part video that demonstrates how to add the GameManager, which creates the instances of the vehicle subclasses. |
8. Cloning Example This video explains the use of cloning. |
9. Game Implementation - Part IV This video is the fourth part of the six-part video that demonstrates how to implement the prototype pattern through a shallow copy. |
10. Game Implementation - Part V This video is the fifth part of the six-part video that highlights the issues with the shallow cloning. |
11. Game Implementation - Part VI This video is the sixth part of the six-part video that demonstrates how to refactor the game to use a deep copy to prevent issues with a shallow copy. |
12. Class Versus Object This video demonstrates how to use different instances of the same class with variations in states. |
13. Varying State This video demonstrates how to remove the extra car and bus classes and simulate objects of other classes by varying the state of a few objects. |
14. Prototype Manager - Part I This video is the first part of the two-part video that demonstrates how to implement the prototype manager. |
15. Prototype Manager - Part II This video is the second part of the two-part video that demonstrates how to complete the implementation of the prototype manager. |
16. Memory Management This video demonstrates how to modify your implementation to use smart pointers to avoid the manual memory management. |
17. Pros and Cons This video highlights the pros and cons of this pattern and explains when to use it. |
7. Builder
1. Introduction This video introduces you to the pattern, its intent, and its structure. |
2. Basic Implementation This video explains the basic implementation of the builder pattern. |
3. File Example - Introduction This video introduces you to the file example. |
4. Issues This video highlights the design issues with the file example. |
5. Builder Implementation This video demonstrates how to refactor the code to use the builder pattern. |
6. Construction Using the Builder Pattern This video explains the usage of the file class through the builder pattern. |
7. Modern Implementation This video demonstrates how to implement a modern builder without creating too many classes. |
8. Fluent Builder This video highlights an alternative implementation of the builder that uses a fluent interface. |
9. Pros and Cons This video highlights the pros and cons of this pattern and explains when to use it. |