Robert Larson

  • Home
  • About Me
  • Contact Me
  • Product Recommendations
  • Client Portal

Software Engineering Blog

Design Patterns

The Abstract Factory Pattern using C++ (Burger King vs. McDonalds Part 2)

March 7, 2017 by Robert Larson

What is the Abstract Factory Pattern? In a previous post, I described the Factory Method Pattern and provided a C++ code example. In this post I would like to provide information on another factory pattern, the Abstract Factory Pattern. Let’s jump right in and start with the Abstract Factory Pattern’s formal definition from “Head First … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns

The Factory Method Pattern using C++ (Burger King vs. McDonalds)

February 27, 2017 by Robert Larson

What is the Factory Method Pattern? If you are looking for a way to encapsulate the creation of objects, factory patterns are just what you need. There are multiple factory patterns but in this post I will just be focusing on the Factory Method Pattern. It is a factory pattern so we should expect the … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns

The Decorator Pattern using C++

February 21, 2017 by Robert Larson

What is the Decorator Pattern? Ever find yourself creating derived classes to add new or variant behavior from an existing class? I have. It seems like a good idea to start but can quickly become a complex maintenance nightmare. I have learned my lesson and avoid falling into that mindset when I need to add … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns

Observer Pattern using C++

February 9, 2017 by Robert Larson

What is the Observer Pattern? The Observer Pattern is a design pattern that allows any number of objects to observe state of a single object and be informed of any changes. The single object is typically described as the subject where the objects interested in changes of the subject are known as observers. The observers … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns

The Strategy Pattern using C++ (The Force is Strong with this Pattern)

January 27, 2017 by Robert Larson

One of the design patterns I have used often in my career is the Strategy Pattern. This is a very powerful pattern. I like the definition from my favorite patterns book, “Head First Design Patterns: A Brain-Friendly Guide“ The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns

Private Implementation (PImpl) Design Pattern using C++

January 12, 2017 by Robert Larson

The Private Implementation Design Pattern (PImpl) is a nice way to hide the internals of a class from other classes that would depend on it otherwise. The advantage of doing so is that it simplifies the header dependency tree which will result in faster build times. For larger systems and/or slow build servers, this may … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns
« Previous 1 2
  • Home
  • About Me
  • Contact Me
  • Product Recommendations
  • Client Portal

Recent Posts

  • March Madness 2019 – Weighted Random Bracket Generator
  • Gifts Ideas for Software Developers 2018-2019
  • March Madness 2018 – Second Chance Weighted Random Bracket Generator
  • March Madness 2018 – Weighted Random Bracket Generator
  • Builder Pattern using C++ (NFL Scheduler Example)

Archives

  • March 2019
  • November 2018
  • March 2018
  • August 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017

Follow me on Twitter

My Tweets

Copyright © 2025 Robert Larson.

Grace WordPress Theme by SiteChurch

%d