In my application, I have several components that should know about each other, such as the menu bar and toolbar, which should know about the table to add or remove tasks, as well as to determine which task is selected.
So, I created an object with a name guiMediatorthat I pass to each object, and they register with it so that they can reach each other using this object. He is also responsible for triggering events when new jobs are added or background workers finish work.
Since he knows a lot about the system, is this type of use too much responsibility in one place or is it the correct use of the template?
source
share