Introduction to Design Patterns in Software Development

In the process of development, inevitably, there are repetitive architectural solutions. There are two ways to work with such solutions:

  1. Accept and duplicate them in the code. This will make your code unreadable, which is not the worst thing. Imagine that you have a hundred code files into which you have copied some repetitive code. It turned out that there was an error in this piece of copied code. Now you have to make edits to each of the hundred files - that's scary.
  2. Use one of the design patterns. This will structure the code and help get rid of redundancy in the architecture.

In order not to invent a definition, I will quote it from Wikipedia:

A design pattern in software development is a repeatable architectural design that represents a solution to a design problem within some frequently occurring context.

Many design patterns are based on the principles of OOP, so I will remind you of these principles.

Let's turn to the Wiki again:

Object-oriented programming is a programming methodology based on the representation of a program as a set of interacting objects, each of which is an instance of a certain class, and classes form an inheritance hierarchy.

The following principles of OOP are distinguished:

  1. Abstraction. We are a class of people and we have nails, this is a common important property. Someone has painted nails, and someone does not - this is an unimportant property, it is omitted in abstraction. The abstraction principle is responsible for separating significant properties and methods into a separate class, omitting insignificant ones.
  2. Encapsulation. Imagine that we are describing a class responsible for the movement of the hand. It has a public method - move_hand, which is available for calling from other classes. Other methods are associated with the movement of the hand, such as moving the joint or the velocity of the neuropulse, which cannot be changed, otherwise the hand will not move. We make them private, inaccessible to public calls and successfully avoid changes. The essence of encapsulation is the ability to hide properties and methods, providing a public interface for interacting with the class.
  3. Inheritance. We are all derived from our parents. We inherited some basic properties from them, but at the same time we regularly expand them, forming a new class, for example, in the learning process. The essence of inheritance is the ability to create a child class from the parent, which can take over its properties and methods, expand or redefine them.
  4. Polymorphism. Before creating a car, we define common properties and capabilities for it: to drive, brake, engine, wheels. All these properties are different for different types of machines. Polymorphism allows you to define one common interface for objects with different implementations.

The main classifications of design patterns are distinguished:

  1. Generative patterns allow you to optimize the process of creating objects through the creation of abstract interfaces. Basic templates: Abstract Factory, Factory, Builder, Singleton, Prototype, and others.
  2. Structural patterns form complex structures that expand the capabilities of one or more objects. The main templates are: Adapter, Bridge, Composite, Decorator, Facade, Proxy, and others.
  3. Behavioral patterns allow you to improve the quality of interaction between objects. The main templates are: Chain of responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, and others.

There are a lot of design patterns, but among them there are those that are more common than others. Here we will begin to consider them in the following articles.



Composition of the IT development team

In this article we will look at the composition of the IT solution development team


About graphs, simply.

In this article, we will begin our acquaintance with graphs, get acquainted with the breadth-first search algorithm (BFS) and implement the graph in the Rust programming language.


What is the difference between outsourcing development and outstaffing an IT employee for development?

In this article we will understand what outsourcing and outstaff development are.


UI/UX design: The creation process

In this article we will talk about the main steps in the process of creating UI/UX design.


UI/UX design: Introduction

In this article, we begin to get acquainted with UI / UX design. This is the most important stage in the development of any visual application interface.


Agile, Six Sigma and No Principle

In the last article, we started diving into the development process. The first stage of this process is planning. At this stage, the project manager, together with other team members, forms a pool of tasks in accordance with some kind of project management methodology.


Meet the Pentest

We are beginning to consider one of the main methods of assessing the security of computer systems and networks for potential vulnerabilities - penetration testing


Reducing the implementation period of MVP

Let's figure out the timing of the implementation of the MVP.


Choosing a programming language

In this article we will talk about choosing a programming language to study


Testing an MVP concept

We will figure out how not to waste the budget on MVP development in vain


Application Architecture Design: Introduction

In this article, we will talk about the process of creating the architecture of an IT solution.


The terms of references: Structure

In this publication we will consider the universal structure of ToR


Incorrect estimation of the cost of IT contractor services

Today we will talk about the incorrect assessment of the cost of developing IT solutions. This pain is one of the main ones for enterprises and startups, including IT contractors themselves.


Choosing the direction of development for programming training

In this article, you will find out what areas of IT development there are, how they differ and in which they pay more


OSI Model Levels

In this article, we will take a closer look at each of the levels of the OSI model


Main types of application architecture

In this publication, we will look at what application architectures are


10 ways to use Rust Cargo

In this short article I have collected 10 ways to use the build system and package manager of the Rust programming language


Documenting code in the Rust programming language

In this article, we will look at how documentation takes place in Rust and consider a very useful opportunity - writing tests through documentation.


Introduction to the OSI model

In this article we begin to consider the fundamental model of network interaction - OSI


CSS animation ripple

A simple example of how to implement ripple animation using HTML and CSS


What is the purpose of an ER-diagram in the development process?

Let's discuss in general terms what an ER diagram is and what it is used for.


From concept to MVP

In this article, you will learn, by example, how to move from a concept to an MVP without unnecessary complications in the functionality of the product


What are UML diagrams used for?

In this article we will talk about what UML diagrams are, what they are and where they are used


Introduction to writing the terms of references

The Terms of Reference are an important part of the development process. In this article, we will begin to dive into this issue.


Introduction to software development

Today, most companies are faced with IT development and often do not get what they want. In this article, we begin to dive into the process of creating IT solutions.


From idea to concept

In this publication, we will talk about how the idea differs from the concept. Let's do this with an example of a specific goal


IT project management methodologies: Waterfall, Scrum, Prince2

In this article, we will consider the basic methodologies of IT project management.


Weighted graphs

In this article, we will get acquainted with weighted graphs, Dijkstra's algorithm, and its implementation in the Rust programming language.


Development Process: Planning

In this publication, we will begin to consider the development process. Let's start with the planning process.