PhonologicalCorpusTools / SLPAA

5 stars 0 forks source link

Reorganize/refactor front- vs back-end code #370

Open kvesik opened 2 months ago

kvesik commented 2 months ago

The SLP-AA codebase is set up with (most) code contained in gui, lexicon, and models packages. It is almost certainly the case that there is no gui code in the lexicon or models folders. However, @Harukaichii points out that there is a fair amount of code in the UI files that maybe doesn't need to be there. One type would be logic around adding/removing/etc data structures from the underlying corpus once the user has made a selection. Another is the actual programmatic construction of the UI itself-- could this be done via a QML specification file, for example?

Not high priority, but something to think about possibly trying to streamline!

Harukaichii commented 2 months ago

Clarification: My main concern was less so about "frontend" vs "backend" but more so about "element creation" vs. "business logic" in the front end

I think there's a lot of code dedicated to creating a component or adding it to the UI. Perhaps we can better component-ize (or move to QML?) our UI elements so in the future when I'm looking at a panel class, majority of the code should be about when I'm supposed to show / do something special with a UI element rather than seeing a lot of code about alignment, spacing, layout etc. of a radio group

when I originally spoke about this I didn't explain myself very well so thanks again for documenting my comments :)