I sing what I see, or see what I sing?
The main task of the business analyst in developing new software is the study of the subject area and the formal description of the information received in the form of a model (Domain Model). The analyst must sing what he sees and what he wants to see. For this, he must have a language in which he will perform his song. However, the analyst is not always familiar with the appropriate language, and therefore often uses other languages. This is partly due to the fact that the project is managed not from the point of view of the subject area, but from the point of view of implementation. And then misfortune can happen to the analyst: he can stop seeing what needs to be sung and start seeing only what there are words in the vocabulary of the language he uses. Everything else ceases to exist for him. Then, instead of singing what he sees, the analyst begins to see what he is singing. I must immediately note that I am not against languages, I am against the narrowing of the field of analysis that occurs due to the insufficiency of these languages.

')
What you need to remember?
To study and describe the subject area, the analyst should know:
- How do we think?
- How do we structure the results of thinking? For this you need to know a formal language that is suitable for recording the results of our thinking FM
Since, to record the results, the analyst does not always have the opportunity to use the
FM , the analyst should also know this:
- Areas of knowledge in which other modeling languages ​​exist. For example, using SQL you can create tables. Some parts of this language may be reflected in the ER model. UML is designed to simulate programs written in object programming languages.
- How to use a language created for other purposes as part of a domain modeling task? For this, the analyst must be able to otmappitsya from FM to another language. That is, he must understand how the shifting of certain constructions written in the FM language into the constructions of another language, for example, UML, occurs.
Unsolved problems
- There is a gap between FM and modeling languages ​​that are used in programming.
- At the same time there are applicants for the title of FM , but none of them has yet become generally accepted. While in university programs there are no courses dedicated to this topic. And while there is no topic, no questions.
Corollary:
It is considered that the languages ​​UML, as well as ER-models can be used to simulate subject areas without restrictions. Therefore, analysts are trying to model the subject area in UML, or ER, even when the restrictions imposed by the modeling language do not allow it to be done correctly.For those analysts who understand the voiced problem, the Holy Grail would be a tool that allows you to simultaneously simulate both the subject area and the implementation in the program code. Therefore, scientists continue to move in a circle, creating new ontological standards, and, at the same time, creating programming languages ​​that would support these ontologies. But for now the gap is great.
History tour
In Europe, Aristotle was the first to try to answer the question of how we structure the results of our thinking. He decided that our consciousness works like this: all objects that we see, we refer to certain types. A type is, according to Aristotle, a list of attributes that describe instances of this type. Each instance is represented in the model by the ordered values ​​of these attributes. The assumption of Aristotle was born on the basis that the record of the objects of our world was originally conducted in the form of data plates. Aristotle gave a picture, but he did not possess the knowledge that we now possess, and therefore his picture of types must be complemented by another property. This property, I have not yet announced, leaving it to you. In this way:
- the table is a body of knowledge about the type and instances of this type
- the parameter string is a type
- the title in the parameter string is the name of the parameter
- value string is an instance of this type
- the value in the value string is a specific feature of this instance
If you see an empty table, then you have a type and its description, you see a filled table, then, in addition to the type and its description, a description of specific instances of this type. This picture is given at the beginning of the article.
We also meet the following tables:

What is shown on this table? The answer to the question can be given in two ways. And both will be true. I'll let you think about the question yourself: what does this table model? And what does the data in this table mean?
Two different meanings of the same statement
As a result, Aristotle gave us the terms: type of objects and an instance of the type of objects. As soon as you hear the term instance, it means we are talking about types. For example, suppose there is a saying: “I am holding a copy of the book The Three Musketeers.” It is interpreted as follows: there is a type of books "Three Musketeers", and there is a specific instance of this type of objects - a specific book. This statement can be abbreviated to: “I am holding the book“ The Three Musketeers ”. This statement can be interpreted in two ways:
- We can say that the object that I hold in my hands has a property. This property of the object is to be a book called The Three Musketeers (Intentional Context)
- We can say that we have an object (element) of the class book "Three Musketeers". Such a statement speaks of extensional context.
In the representation of Aristotle, we work only in an intensional context, where all objects have certain properties. This class of representations is fixed in the ontological standard
MOF . On this standard is built and ER-models, and the PLO. Question: Does this method of object typing really give us an idea of ​​how we think and how we structure our knowledge? In order to figure this out, we need to conduct an experiment.
Employees and experiments
Suppose there is a group of employees of the laboratory of experimental physics, and a series of experiments that are conducted by the laboratory staff. Let us ask ourselves: how to model this subject area in terms of Aristotelian logic? The first thing that comes to mind is for each employee to start the “Experiment” feature, the start date and the end date, in which it will be written, from what time for which and in which experiment the employee is busy. That is, in the logic of Aristotle, an experiment would be a sign of an employee. This means that the question "What kind of employee?" Can be answered: "Employed in the experiment."

Exactly until the employee starts working on two experiments at once. Then we will not be able to create the “Experiment” parameter, because the relations between the employees and the experiments immediately become many to many.
It is no longer possible to model this relationship in terms of signs. We'll have to create a new type of entity “Communication”, which stores the link to the employee and the experiment, but in itself means nothing. Such objects are simply not in nature!

In addition, we got a certain leap in the model. Up to a certain point, we managed with two types of entities, but at the moment when it turned out that employees could work on several experiments at once, it turned out that these entities were not enough. Our brain doesn't work that way. For him there is no difference over one, or several experiments, employees work. In my head, the model of reality does not change. This means that this class of models has limitations.
Quantum leap in the modelSometimes we turn our ideas about things upside down. For example, quantum mechanics has shown us a paradox in which we have to admit that the past can be changed. And then we change our picture of the world. When we learn that employees work in different projects, this does not change our picture of the world. However, this knowledge leads to a qualitative leap in data modeling!
Perhaps OOP will give us the answer to the question of how to model the world? To do this, consider another example. Let's try to model apple trees, varieties of apple trees and their habitat ranges.
Apple trees and habitats
Suppose we have apples and it is necessary to model the range of their growth. Let me remind you that specific apples can not know anything about the range. They know only the coordinates of their place of growth. The area is determined on the class of apple trees and only on the class. Question: which object in the OOP model will store the value of the “Area” parameter? OOP allows you to do this in a variety of ways.
Ambiguity of the model implementationThe fact that this is realized in different ways already tells us that the PLO does not model our vision of the world. Our vision is unique. We lined up this vision for centuries together by the whole European world, and came to certain models. These models are unambiguous. Therefore, if there is a design methodology that leads us to different models, then this methodology is not suitable for us to model the subject area.
The first implementation
You can create a static variable in the class "Apple trees". What does this variable mean? This variable is created for objects of this class one for all. Question: is this class variable, or class objects? Logically, we can conclude: if the value of a variable is available to class objects, then it is a variable of class objects, not a class of objects! That is, creating a static variable does not solve the task of creating a class variable. Thus, we come to the second way to implement the task.
The second implementation
Create a class "Apple Subclasses", which will declare the parameter "Area". The object "Class of Apple Trees", which is an object of the class "Apple Subclasses", will contain the value of the parameter "Area". Add the "List of apple trees" parameter in the class "Apple Subclasses". Then the object "Apple Class" will have a list of links to objects of the class "Apple Trees". What can we do now, thanks to the new structure? We will establish a new object of the class “Subclasses of apple trees” under the name “Pear” and associate with this object a list of objects of the class “Apple trees” that we need to mark as pears. Thus, we can design a subclass of apple trees - a class of pears, and by adding the necessary operations on lists, we can operate with classes, not just class objects. This will give us the opportunity to study the intersection of the habitats of different varieties of apples, as well as their association. What is wrong with this approach?
What's wrong?
- First, we manually created the object "Class of Apple Trees" while OOP postulated the thesis that we can work with classes of objects. However, OOP has a built-in mechanism for working with class objects, but not with a class. That is, when you declare a class, you are actually describing objects of this class, and not the class itself! There are standard operations with classes of objects: intersection, union. OOP has no built-in mechanisms for implementing such operations. To implement them, you need to simulate them manually. For example, in the case of apple trees, we had to use an auxiliary class, Apple Subclasses, to model pear trees.
- Secondly, in the UML language there is no possibility to draw a connection between the object “Classes of apple trees” and objects of the class “Apple trees”. This relationship is called classification. You will not find it in OOP models.
- Thirdly, it is impossible to create an object in UML, and only then to classify it. And also it is impossible to reclassify the object, if the result of the classification did not suit us. This is the fundamental limitation of OOP from real domain modeling. This restriction is equivalent to the restriction of the logic of Aristotle.
Was there a boy?You are now looking at the monitor. True? Actually you look nowhere. Just the mind interprets the signals received from the eyes, decrypts them and makes a comparison with those images that are stored in his memory. Having chosen the right one, he checks whether the received image contradicts the signals from other perception channels. If the signals from different channels do not contradict each other, that is, they do not cause dissonance, then the mind gives a solution: we have an object, which by its characteristics can be attributed to the class of monitors. But it may happen that the brain produces a different solution, taking the object to the class of tomato. And then the subject will poke a finger at the monitor with the words - a tomato. But the object does not change its properties, the perception of this object will change. Therefore, in nature there are no dogs, no cats, no monitors. There is an entity that we interpret as a set of parts, the parts are called objects, and then we classify them and the relations between them.
findings
- We saw that modeling in categories of types or classes of OOP leads us to the fact that the constructed models are not expandable. That is, it is necessary to build a data structure in advance for growth, otherwise then it will not be possible to expand the functionality without breaking an existing functionality.
- Analysis of the contradictions of Aristotelian logic led to the development of the theory of sets. First, the primitive theory proposed by Cantor, and then modern. In one of the axiomatics of modern set theory, the term set is replaced by the term class to emphasize the difference between them. But these are not the classes everyone is used to (OOP classes).
- It turns out that the model of the world we are creating is much richer than the one we usually write on paper as text or a table. A lot of effort was spent to understand how our consciousness works when creating a model of being and how it should be recorded.
Let's see how set theory handles these tasks
(To be continued) .
PS You might think that I am against modeling the subject area in classical notations. No, I just want us to be able to think, to be able to convey these thoughts and reflect them in the model in the correct way.