Discussing the article: "Design Patterns in software development and MQL5 (Part 3): Behavioral Patterns 1"

 

Check out the new article: Design Patterns in software development and MQL5 (Part 3): Behavioral Patterns 1.

A new article from Design Patterns articles and we will take a look at one of its types which is behavioral patterns to understand how we can build communication methods between created objects effectively. By completing these Behavior patterns we will be able to understand how we can create and build a reusable, extendable, tested software.

In this article, we will provide the behavioral patterns that are concerned with assigning and setting how are responsibilities between objects. They also identify how objects can communicate or interact with each other and there are many patterns under this type, the same as the following:

  • Chain of responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor

Author: Mohamed Abdelmaaboud

 

after

you don't have to read any further

 
Maxim Kuznetsov #:

after

you don't have to read any further

It's a translation from the original English.


You can mentally replace it with "handler". Or just don't read it and write your own articles.

Article on the topic https://habr.com/ru/articles/113995/

Паттерн проектирования «Цепочка обязанностей» / «Chain of Responsibility»
Паттерн проектирования «Цепочка обязанностей» / «Chain of Responsibility»
  • 2011.02.17
  • habr.com
Почитать описание других паттернов. Проблема Эффективно и компактно реализовать механизм обработки потока событий/запросов/сообщений в системах с потенциально большим количеством обработчиков. Описание Модель событие/обработчик широко применяется в программных системах из различных областей. В основном, это — графический интерфейс пользователя...
 
Rashid Umarov #:

This is a translation from the English original.


You can mentally replace it with "handler". Or just don't read it, but write your own articles.

Article on the topic https://habr.com/ru/articles/113995/

it's not about translation... there is almost no text in the article, that's why there is a strict bias towards the code.

does the code from the screenshot have a chance to pass code-review ?

and about "write your own" - you are in the know, I suggested a series about using gcc and msys2 environment, but it turned out that you can't except MSVC

 
Maxim Kuznetsov #:

What do you think is the "right" thing to do?

 
template<typename T>
void ConcreteIterator::Next(void)
  {
   m_current++;
   if(!IsDone())
     {
     }
  }


What isthis even for? Looked at the material on iterators, there are these options:

1)

template<typename T>
void ConcreteIterator::Next(void)
  {
   m_current++;
  }

2)

template<typename T>
void ConcreteIterator::Next(void)
  {   
   if(!IsDone())
     {
       m_current++;
     }
  }