hyperdome icon indicating copy to clipboard operation
hyperdome copied to clipboard

Should the UI classes contain as much logic as they do?

Open stevenpitts opened this issue 6 years ago • 2 comments

Currently, a lot of the logic is being performed in the UI classes, like HyperdomeClient. The issues with this:

  • Tests will be more difficult to run
  • UI changes could break logic
  • Feels like poor programming

I think we should keep the logic in HyperdomeClient, but move the UI aspects to a new class. Do you agree?

stevenpitts avatar May 23 '19 13:05 stevenpitts

Hmm, I may be overthinking this; looking at it again, there's not too much logic in there. Edit: I'm not. But the issue is more with separation of class UIs and logic; for example; the Server object is located in the "add_server_dialog" file.

stevenpitts avatar May 23 '19 13:05 stevenpitts

I would like to at some point re-do the UI using QML or some other more self contained Qt code, exposing the interface in such a way that a sort of MVC paradigm can be used to organize the code. The models can then be moved up to the common code base between server and client.

arades79 avatar Feb 17 '20 03:02 arades79