Organizing Multi frame app using Tkinter and MVP architecture

125 Views Asked by At

I built a multi frame app that uses MVP. It works but I'm not very satisfied with what I done and I hope we could discuss about the different (better) ways to do this . In order to have a starting point I wrote this little "working" app which has a basic Model, a main Presenter/View pair and an other ControlPresenter/ControlView pair.

GitHub Link : https://github.com/Riddeen/MVP_Protocol_base.git

At this time, I create the new frame "ControlView" and his presenter "ControlPresenter" in the main presenter "Presenter". I did that because at the end, the ControlView frame will belong to to the main window "View". The idea is that the main window can contain several of these frames (each frame being a representation of a different logic part of the app). But I'm pretty sure their is a better way to do that.

And is it the role of the main presenter to add these frames ? Is it the role of the main function ? Or even is it the role of a common "Super presenter" which will initialize all the others with their respective view ? ... I'm a bit lost. but I'm obstinate

Thank you for you help !

0

There are 0 best solutions below