Software Design Patterns in C++

Introduction Download
Course Outline Outline
Reading Material Download
C++ IDE You can use any of the following IDE for this course:
DayModulesSharing
1

Introduction:

  • Why do we need Design Pattern?
  • A bit of the history
  • Good software practices and principles
  • The Gang of Four (GoF)
  • Overview of the Design Patterns
  • Essential software engineering disciplines
  • How patterns are documented?
  • Class
  • Abstract Class
  • Aggregation & Composition
  • Multiplicity
  • Association
  • Role
  • Attributes
  • Operations and Methods
  • Abstract Factory
  • Builder
  • Factory Method
  • Prototype
  • Singleton
  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Façade
  • Flyweight
  • Prox
  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor
  • Inheritance
  • Polymorphism
  • Abstract Classed and Methods
  • Interfaces
  • Access Modifiers
2

Creational Patterns:

  • Creating Singleton Using a Static Method
  • Exceptions and Instances
  • Throwing the Exception
  • Creating an Instance of the Class
  • Providing a Global Point of Access to a Singleton
  • Example in C++
  • When to Use a Factory Method?
  • Example in C++
  • How a Simple Factory Works?
  • Building the Simple Factory
  • Using the Factory
  • Consequences of Abstract Factory
  • Example in C++
  • How a Builder Works?
  • Consequences of the Builder Pattern
  • Example in C++
  • Using the Prototype
  • Deep Vs Shallow copy
  • Cloning the Class
  • Using the Prototype Pattern
  • Dissimilar Classes with the Same Interface
  • Prototype Managers
  • Consequences of the Prototype Pattern
  • Example in C++

Exercises:

3

Structural Patterns:

  • Basic understanding of GC based system
  • An Implementation of a Composite
  • Doubly Linked Lists
  • Consequences of the Composite Pattern
  • A Simple Composite
  • Example in C++
  • Handling events in a Decorator
  • Layout Considerations
  • Multiple Decorators
  • Decorators, Adapters, and Composites
  • Example in C++
  • What Constitutes the Façade?
  • Consequences of the Façade
  • Example in C++
  • Making an Adapter
  • The Class Adapter
  • Two-Way Adapters
  • Pluggable Adapters
  • Example in C++
  • Copy-on-Write
  • Comparison with Related Patterns
  • Example in C++
  • Extending the Bridge
  • Windows Forms as Bridges
  • Consequences of the Bridge Pattern
  • Example in C++
  • Sharable Objects
  • Copy-on-Write Objects
  • Intrinsic and extrinsic
  • Example in C++

Exercises:

4

Behavioural Patterns:

  • Applicability
  • Consequences of the Chain of Responsibility
  • Example in C++
  • Motivation
  • Command Objects
  • Building Command Objects
  • Consequences of the Command Pattern
  • Example in C++
  • Motivation
  • Applicability
  • State machine
  • Objects Used in Parsing
  • Regular Expression
  • Example in C++
  • Motivation
  • Consequences of the Iterator Pattern
  • Iterators in C++ collections classes
  • Example in C++
  • Interactions Between Controls
  • Initialization of the System
  • Mediators and Command Objects
  • Consequences of the Mediator Pattern
  • Single Interface Mediators
  • Implementation Issues
  • Example in C++
  • Motivation
  • Implementation
  • Providing Undo
  • Command Objects in the User Interface
  • Example in C++

Exercises:

5
  • “Don’t call me, I will call you” model
  • Consequences of the Observer Pattern
  • Event-Handler model in .NET
  • Example in C++
  • Switching Between States
  • How the Mediator Interacts with the State Manager?
  • Consequences of the State Pattern
  • Example in C++
  • Motivation
  • The Context
  • The Program Commands
  • Example in C++
  • Motivation
  • Kinds of Methods in a Template Class
  • Templates and Callbacks
  • Summary and Consequences
  • Example in C++
  • Motivation
  • When to Use the Visitor Pattern
  • Visiting the Classes
  • Visiting Several Classes
  • Catch-All Operations with Visitors
  • Double Dispatching Issue
  • Traversing a Series of Classes
  • Consequences of the Visitor Pattern
  • Example in C++
  • Overall structure of the design pattern catalogue
  • Classification of relationships
  • Categories of relationships
  • Modifying relationships and design patterns

Exercises:


Other Java related Courses you might be interested
SE002 The Practice of Writing Excellent Code
SE001OOT Introduction Basic Object-Oriented Concepts
SE001CPP C++ (Basic)
SE002CPP C++ (Advanced)
AI001 Programming with Artificial Intelligence Techniques

Recommanded Books
TitleHands-On Design Patterns with C++: Solve common C++ problems with modern design patterns and build robust applications
ISBN978-1-804-61155-5
AuthorFedor G. Pikus
Year2023
Publisher Packtpub
TitleC++ Software Design: Design Principles and Patterns for High-Quality Software
ISBN978-1-098-11316-2
AuthorKlaus Iglberger
Year2022
Publisher O'Reilly Media
TitleSoftware Architecture with C++: Design modern systems using effective architecture concepts, design patterns, and techniques with C++20
ISBN978-1-838-55459-0
AuthorAdrian Ostrowski, Piotr Gaczkowski
Year2021
Publisher Packt
TitleDesign Patterns in Modern C++: Reusable Approaches for Object-oriented Software Design
ISBN978-1-484-23603-1
AuthorDmitri Nesteruk
Year2018
Publisher Apress