EasyScience / EasyDiffractionApp

Diffraction data analysis application
https://easydiffraction.org
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Initial PyQtmlProxy refactoring #24

Closed rozyczko closed 2 years ago

rozyczko commented 3 years ago

Already started as part of DAS-296.

Has to be done for all state components, so PyQmlProxy is just a proxy layer, with no or little logic

rozyczko commented 3 years ago

This is going to consist of several stages, rather than a single rewrite. This is done in order to minimize impact on other development. Stage 1: moving all the logic to separate files, with each logic responsible for a single data type: experiment, sample, project, fitting, etc. At the end of this stage, the proxy file will only contain externally accessible properties, signals, slots and accessors but also will be responsible for initializing all logic components and exchanging data between them

Step 2: Moving the logic initialization stage and inter-logic communication to a separate component (controller), along with signal separation into external and internal (between controller and logic components). We should aim at reducing the number of signals used and try to have them only as property notifiers in the proxy.

rozyczko commented 3 years ago

Both stages are completed but after discussion with @AndrewSazonov some redesign will still be done in the main proxy. Slots/methods related to common functionality will be refactored into separate "sub-proxies" with their own logic components attached. This will necessitate redesign of the Logic Controller. It is still unclear whether this structure will allow for easy/easier inter-logic communication but we will see.