Common Patterns in C++

In this chapter, you will learn various design patterns in C++. Design patterns provide a common approach to solving different types of problems properly, and oftentimes, design patterns are discussed throughout the internet, at conferences, and in front of the water cooler at work regarding their advantages and disadvantages.

The goal of this chapter is to introduce you to some of the more popular, less popular, and even controversial patterns, giving you an idea of the different types of problems that design patterns attempt to solve. This is an important chapter as it will give you the skills to tackle hard problems by teaching you already existing approaches to common problems others have experienced in the past. Learning even a subset of these design patterns will lay the foundation for discovering other design patterns on your own as you run into problems in your own applications.

The recipes in this chapter are as follows:

  • Learning the factory pattern
  • Using the singleton pattern properly
  • Extending your objects with the decorator pattern
  • Adding communication with the observer pattern
  • Improving performance with static polymorphism
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset