To start with, I want to specify what is meant by a modular application in this article. So, a modular application will be considered an application, which consists of the so-called shell and a set of plug-in modules. There is no direct dependence between them, only via contracts. This allows independently modify each of the components, change their contents, etc. I think everyone knows the advantages of modular architecture.
Recently, I have often had to use the well-known Visitor pattern. I used to ignore this pattern and thought that it simply complicates the code. In this article, I will share my thoughts about this pattern. We will talk about pros and cons, as well as what tasks it helps to solve and how to simplify its use. The code will be in C#.