The primary objective of this roadmap is to refactor the existing tab classes within the UI window to adhere to the Model-View-Presenter (MVP) architecture. This refactoring will enhance code organization, modularity, and testability while allowing for smoother future modifications. The incremental approach detailed below will ensure a systematic and efficient transition.
Approach
The refactoring process will follow a bottom-up approach, addressing individual tabs, creating common interfaces, and adapting the window class for MVP compatibility.
First Stage (Tab Refactoring)
Each tab will be refactored individually to accommodate the MVP architecture. The tabs scheduled for refactoring are:
ISIS Energy Transfer #35754
Refactoring is done in #35901
Future work:
Add units test to IETPresenter and IETDataValidator in ISISEnergyTransferModelUtils.h #35960
Remove QT dependencies from the presenter #35961
Refactor setInstrumentDefault in the view and move the logic to the presenter or the model where possible #35962
Refactor plotRaw in IETModel into multiple functions #35963
Potential improvements:
Reduce validation logic in the view and move it to the model
Add more unit tests to IETModel
ISIS Calibration - #35755
ISIS Diagnostics #35756
ISIS Transmission #35757
ILL Energy Transfer
This needs to be discussed with the ILL team
Second Stage (Common Interface Refactoring) #35961
After individual tab refactoring, create common interfaces for the tabs to share a consistent MVP structure, removing the old tab interfaces. In addition, define a mechanism for passing instrument details from the window class to the tabs.
Third Stage (Window Refactoring)
Refactor the window class to make it MVP-compatible.
Goal
The primary objective of this roadmap is to refactor the existing tab classes within the UI window to adhere to the Model-View-Presenter (MVP) architecture. This refactoring will enhance code organization, modularity, and testability while allowing for smoother future modifications. The incremental approach detailed below will ensure a systematic and efficient transition.
Approach
The refactoring process will follow a bottom-up approach, addressing individual tabs, creating common interfaces, and adapting the window class for MVP compatibility.
First Stage (Tab Refactoring)
Each tab will be refactored individually to accommodate the MVP architecture. The tabs scheduled for refactoring are:
ISIS Energy Transfer #35754
Refactoring is done in #35901 Future work:
IETPresenter
andIETDataValidator
inISISEnergyTransferModelUtils.h
#35960Potential improvements:
ISIS Calibration - #35755
ISIS Diagnostics #35756
ISIS Transmission #35757
ILL Energy Transfer
This needs to be discussed with the ILL team
Second Stage (Common Interface Refactoring) #35961
After individual tab refactoring, create common interfaces for the tabs to share a consistent MVP structure, removing the old tab interfaces. In addition, define a mechanism for passing instrument details from the window class to the tabs.
Third Stage (Window Refactoring)
Refactor the window class to make it MVP-compatible.