Hi friends! With you, Alex and I continue our series of articles on the use of design patterns in the Golang language.
It is interesting to receive feedback from you, to understand how applicable this area of knowledge is in the world of the Golang language. We have already looked at patterns: Simple Factory, Singleton, and Strategy. Today I want to consider another design pattern — Prototype.
It is a creating design pattern that allows objects to be copied without going into the details of their implementation.
Imagine you have an object that needs to be copied. How to do…
Hi friends. Alex Versus with you.
The Factory method, also known as the Virtual Constructor, is an astounding design pattern that defines a common interface for creating objects in a parent class and allows you to modify the created objects in child classes.
The pattern allows a class to delegate object creation to subclasses. Used when:
Hi friends. My name is Alex Versus and today we will take a look at the Singleton pattern, an implementation in the Golang language.
Singleton — refers to creational patterns. Ensures that:
Let’s talk about the problem that the pattern solves. A loner solves two problems at once, violating the Single Responsibility Principle (SRP):
Hello everyone, friends. My name is Alex and I am a professional software developer and creator in the web industry. I have been studying languages for many years, sharing my experience with others.
Today I want to talk to you about the Strategy design pattern. I will try to convey to you the principles and essence of the template without water, and show you how to apply it in practice.
Design patter Strategy refers to behavioral design patterns. It’s task is to identify similar algorithms that solve a specific problem. …