Rewrite the renderer GUI using FABLE-elmish-react
This is a suggestion for a future enhancement to the Visual2 code. I'm annoyed by the duplication in the HTML used for the skeleton, and also in much of the GUI F# code.
I suggest rewrite using fable-elmish-react
Advantages:
- Write the web part properly, making changes much easier
- Reduce code size by abstracting common patterns
- elmish-react is the referred F# SPA tech and looks to have a long life.
- elmish-react is at centre of new web development ideas and so tech learnt will have value beyond F#
- (for person doing it) a great way to get into fable-elmish-react
Additional reference:
fable-elmish-react-electron toolbox may help in integrating this with electron framework, though I suspect nothing there needs to change.
I will definitely do this over the Summer if no-one else bids - so if you are possibly interested indicate this on the issue. If someone else does it I'll provide code review etc.
using react components I'd expect the following to be implemented functionally using maps and tables without duplicate code:
- List of settings (and code to persist them with electron-settings)
- List of registers
- set of buttons on toolbar
The renderer mutables have got a bit more complex due to adding more caching to increase performance when single-stepping. The caching uses mutables to store intermediate results and avoid recomputation. It is effectively a crude form of memoisation and thus referentially transparent (and harmless) - but it does not look like that. Furthermore the additional mutables have global scope, if used wrongly they would not be harmless!
TODO: when the renderer code is refactored find common boilerplate (like a memoise function) to do this with embedded mutable state in a guaranteed transparent way. Then experiments can be made remembering arbitrary things to increase performance in a clean way, with the extra mutability hidden and harmless.