So, for my current project, there are three main Java classes:
- GUI
- Instant messaging
- Calculation
Essentially, there should be a complete connection, so we decided to use the intermediary approach, rather than letting the graphical interface run the entire project.
Basically, the pick is going to encapsulate the message. The problem we are facing is how to allow updating GUI components without creating tons of methods to call the broker at any time.
Ex. Say the GUI wants to log into the userโs system, the process of creating the stream and logging in goes through the intermediary, but then the intermediary must pass the success / failure back to the graphical user interface and update the status message.
Another problem is that you need to update the GUI, but not the moderator. Is it practical to just let the GUI instantiate this class and run it, or should everything go through an intermediary?
Our original design simply had a GUI that controlled everything, but it really killed reuse. Is there a better design method in this case?
source
share