StackStalk
  • Home
  • Java
    • Java Collection
    • Spring Boot Collection
  • Python
    • Python Collection
  • C++
    • C++ Collection
    • Progamming Problems
    • Algorithms
    • Data Structures
    • Design Patterns
  • General
    • Tips and Tricks

Design Patterns using C++

Design patterns describe recurring software design problems and their solutions. These articles explain the principles behind commonly used design patterns and provide sample implementations in C++. Design patterns are independent of any programming language and the principles described in these articles could be used to implement in any programming language of choice.

About Design Patterns

This article gives a basic introduction to design patterns and talks about the classification of design patterns namely creational design patterns, structural design patterns and behavioral design patterns.

C++ Singleton Design Pattern

Singleton is the simplest of creational design patterns. Singleton design pattern is a template to provide one and only instance of an object.

C++ Factory Design Pattern

Factory design pattern is a creation design pattern to localize the object creation code and prevents disturbing the entire system for a new type introduction.

C++ Observer Design Pattern

Observer design pattern is a behavioral design pattern and used to notify multiple objects of a change to keep them in sync like Model-View-Controller (MVC) concept.

C++ Template Design Pattern

Template design pattern is a behavioral design pattern. In the template pattern, parts of program which are well defined like an algorithm are defined as a concrete method in the base class. The specifics of implementation are left to the derived classes by making these methods as abstract in the base class.

C++ Chain of Responsibility Design Pattern

Chain of Responsibility is a behavioral design pattern. The basic idea behind this pattern is that a request or a command passes through a chain of objects until it is handled.

C++ Command Design Pattern

Command pattern is a behavioral design pattern where the command or request is encapsulated and treated as a object. This article talks about the various classes participating in a command design pattern.

C++ Adapter Design Pattern

Adapter pattern is a structural design pattern. Also referred as wrapper pattern. An adapter design pattern allows classes to work together that normally could not because of incompatible interfaces, by providing its interface to clients while using the original interface.

C++ Visitor Design Pattern

The visitor design pattern is a structural design pattern and allows the separation of data structures and algorithms from the data itself.

C++ Facade Design Pattern

Facade design pattern is a structural design pattern. Makes an existing complex software library easier to use by providing a simpler interface for common tasks.

C++ Builder Design Pattern

Builder design pattern in useful when you want to build a complex object. Intent of this pattern is to separate the construction of object from its representation.

C++ Decorator Design Pattern

Decorator design pattern is useful when you want to add capabilities (statically or dynamically) to an object without sub-classing the concrete object's class as well as not affecting other objects of the same concrete class.

0 comments:

Post a Comment

Home
Follow @StackStalk
Get new posts by email:
Powered by follow.it

Popular Posts

  • Avro Producer and Consumer with Python using Confluent Kafka
    In this article, we will understand Avro a popular data serialization format in streaming data applications and develop a simple Avro Produc...
  • Monitor Spring Boot App with Micrometer and Prometheus
    Modern distributed applications typically have multiple microservices working together. Ability to monitor and manage aspects like health, m...
  • Server-Sent Events with Spring WebFlux
    In this article we will review the concepts of server-sent events and work on an example using WebFlux. Before getting into this article it ...
  • Implement caching in a Spring Boot microservice using Redis
    In this article we will explore how to use Redis as a data cache for a Spring Boot microservice using PostgreSQL as the database. Idea is to...
  • Python FastAPI microservice with Okta and OPA
    Authentication (AuthN) and Authorization (AuthZ) is a common challenge when developing microservices. In this article, we will explore how t...
  • Spring Boot with Okta and OPA
    Authentication (AuthN) and Authorization (AuthZ) is a common challenge when developing microservices. In this article, we will explore how t...
  • Getting started with Kafka in Python
    This article will provide an overview of Kafka and how to get started with Kafka in Python with a simple example. What is Kafka? ...
  • Getting started in GraphQL with Spring Boot
    In this article we will explore basic concepts on GraphQL and look at how to develop a microservice in Spring Boot with GraphQL support. ...

Copyright © StackStalk