Answer the question
In order to leave comments, you need to log in
How to organize the work of the program and build the architecture correctly?
There is a window application that has many features. There are about 30 different functions. Each function is designed as a class. One of the functions is creating files and writing to the database (eg class CreateFile).
When the function is activated, the class is called as a process (via exec). All operations for creating, saving and writing to the database are isolated within the class, but, for example, the operation of writing to the database is carried out through a call to the parent function ( parent->save_in_db(data) ) . It turns out isolation only at the level of code, not functionality. As a result, the program is difficult to test, since there are many dependencies in the modules.
The question is: what is the best way to organize such programs? There is an option to simply send a signal and data to the parent, and the parent will call the write function to the database, playing the role of a hub, passing data from class to class.
I would be grateful for a reference to any source of information on this topic, advice ...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question