GUI design for Harware configuration
-
Hello, I have been designing a cross-platform GUI application using JUCE framework and need some help in designing it. The GUI will be used for configuring the hardware/device. I did layering for the application as below. - Presentation Layer - Controller Layer - Model Layer - Communcation Layer I’ll explain each of them as below. Model Layer: It contains the actual data that is displayed in the UI and stored in the hardware/device. For e.g Device Information (ID, Name, version number) Presentation Layer: It displays the information present in the Model/Hardware or the information after being manipulated in the Model. Mainly, it acts a View. Controller Layer: It controls the requests coming from presentation layer and hardware/model layer. Communication Layer: It communicates with the actual hardware through some protocol and send/receive from/to controller. So, the basic flow from UI to device will be Presentation -> Controller -> Communication -> H/W -> Receive message from H/W -> Communication -> controller -> Model and Presentation And reverse would be Receive message from H/W -> communication -> controller -> model and presentation. Here are my questions w.r.t design. - Model will have entities such as Employee, Department which will be used inside the controller. Shall I create a EmployeeController and departmentController OR should I have a single controller class only - If I wanted to show information of an emplyee in a department in UI, should I create corresponding views in the UI such as employeeView and departmentView. - What patterns we can apply for different layers, especially for GUI - Where should I write the observer pattern in order to update the UI when there is a change in the value of the Model. - Appreciate if someone can provide me an example for Loosly coupled GUI application in C++ and that interacts with the hardware. Please let me know for any clarification. Thanks in advance for your time and effort.
Praveen Raghuvanshi Software Developer