Video description
With design patterns, it is very easy to solve common object-oriented design problems. However, understanding and learning design patterns is tough and time-consuming. This course will help you get acquainted with design patterns and teach you some useful techniques to implement them in modern C++.
The course starts with an introduction to design patterns and explains the structure of a pattern with the help of a Unified Modeling Language (UML) class diagram. Then, you will understand how to implement a design pattern, how to examine the issues, and how to refactor the code by studying different types of design patterns such as adapter, façade, proxy, decorator, composite, bridge, and flyweight. In addition to this, you will also learn about the pros and cons of each pattern.
By the end of this course, you will be well-versed in various structural design patterns and will have developed the skills to implement them in modern C++.
What You Will Learn
- Use the adapter pattern to convert an incompatible interface into a compatible one
- Control access to the original object using the proxy pattern
- Form larger structures through recursive composition using the composite pattern
- Simplify complex interfaces of a system using the façade pattern
- Enable sharing of large number of objects using the flyweight pattern
- Use the decorator pattern to add more behaviors to an object at runtime
Audience
If you are a student who wants to get a basic understanding of design patterns; a software developer, project manager, or an architect who wants to understand and implement design patterns in their projects; or a C++ developer who wants to implement design patterns in C++, this course is for you. To get started with this course, it is necessary to have basic knowledge of C++ and object-oriented programming concepts.
About The Author
Umar Lone: 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++.
Table of contents
-
Chapter 1 : Introduction
- Course Overview
- Introduction to Design Patterns
- Overview of Unified Modeling Language (UML) Class Diagrams
- Single-Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion (S.O.L.I.D.) Principles – Part I
- Single-Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion (S.O.L.I.D.) Principles – Part II
- Single-Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion (S.O.L.I.D.) Principles – Part III
- Structural Design Patterns Overview
- Chapter 2 : Adapter Design Pattern
- Chapter 3 : Façade Design Pattern
-
Chapter 4 : Proxy Design Pattern
- Introduction to the Proxy Pattern
- Basic Example
- Introducing Virtual Proxy
- Implementing Virtual Proxy
- Applying Virtual Proxy
- Introduction to Protection Proxy
- Protection Proxy Example
- Applying Protection Proxy
- Remote Proxy Introduction
- Example of the Remote Proxy
- Using the Remote Proxy as a Component Object Model (COM) Component
- Smart Proxy
- Pros and Cons
-
Chapter 5 : Decorator Design Pattern
- Introduction to the Decorator Pattern
- Basic Example
- Adding the Abstract Decorator Class
- Implementing and Applying Streams
- Adding Buffering to Streams
- Adding the BufferedStream Class
- Adding Encryption and Compression Support to Streams
- Using Composition Instead of Inheritance
- Adding the Abstract Decorator Class to Stream Class Hierarchies
- Decorator Types
- Static Decorator
- Functional Decorator
- Pros and Cons
- Chapter 6 : Composite Design Pattern
-
Chapter 7 : Bridge Design Pattern
- Introduction to the Bridge Pattern
- Bridge Intent and Implementation Overview
- Basic Example
- Shapes Hierarchy and Implementing the Line Class
- Adding More Shape Classes
- Adding Support for Rendering through OpenGL
- Shapes Hierarchy Issues
- Bridge Implementation
- Handle-Body
- Creating the String Class
- Implementing Sharing for String Objects
- Pointer to IMPLementation (Plmpl) – Part I
- Pointer to IMPLementation (Plmpl) – Part II
- Static Bridge
- Pros and Cons
-
Chapter 8 : Flyweight Design Pattern
- Introduction to the Flyweight Pattern
- Intent and Implementation Overview
- Basic Implementation
- Game Implementation – Part I
- Game Implementation – Part II
- Game Implementation – Part III
- Creating String Class
- Adding StringInfo for Sharing Internal Strings
- Implementing String Interning
- Boost.Flyweight
- Pros and Cons
Product information
- Title: Structural Design Patterns in Modern C++
- Author(s):
- Release date: November 2020
- Publisher(s): Packt Publishing
- ISBN: 9781801073073
You might also like
book
Design Patterns in Modern C++: Reusable Approaches for Object-Oriented Software Design
Apply modern C++17 to the implementations of classic design patterns. As well as covering traditional design …
video
Behavioral Design Patterns in C++
The course takes a structured approach to explain each pattern, starting with an introduction and then …
book
Hands-On Design Patterns with C++
A comprehensive guide with extensive coverage on concepts such as OOP, functional programming, generic programming, and …
book
Functional Programming in C++
Functional Programming in C++ teaches developers the practical side of functional programming and the tools that …