Open jacobranz opened 7 months ago
Do you mean make the code more modular by separating the GUI-related classes inside of main.py
?
I'm a little confused, could you explain/clarify more? Thank you!
Correct, I am not super happy with the way it's all in one file. I think separating the frames into separate file classes will help.
In researching ways to make more complex GUIs there is a way to separate into views and models. Where views just display info and models actual query information that the views use.
I Can send links when I get home! Does that make any more sense?
That makes sense, thank you! The views and models architecture reminds me of SwiftUI programming practices and app development with Swift.
@dishb what other languages are you familiar with? I know here is an odd place to ask. But I am looking to start a project (that isnt so messed up) from scratch. I am interested in deploying it on Linux using c++ or javascript. Both languages I am trying to learn more about. Thoughts?
Sorry, I'm only fluent in Python 😅
I've been learning a few others like JS and Swift, but mostly the syntax/basics.
I've pushed commits that refactor the code to have each class in a separate file. However, due to the way the classes utilize each other (such as ClassPage
and Math150
), the codebase is broken. After refactoring, the classes using each other lead to circular imports, breaking the code. For a fix, you would either have to redo all the subject classes (Math, Physics, English, and Music) or the ClassPage
class.
Commits can be seen in dishb/student_management_system:modular-code.
No worries! Lets keep making this project well rounded!
Thank you for the info. I will take a look now at the circular imports. I will also keep working the graphical layout logic.
Would you be able to merge your fork back to this repo? I am not sure how I can edit your fork without redoing all your work. Maybe I am just being dumb and don't know how! Either way, great work! Lets keep it up.
Sorry for so many comments. Dont worry about it, I will copy the changes manually! Have a good night!
Would you be able to merge your fork back to this repo? I am not sure how I can edit your fork without redoing all your work. Maybe I am just being dumb and don't know how! Either way, great work! Lets keep it up.
For me to merge dishb/student_management_system:modular-code
, you need to create a branch named modular-code
(anything works really) in this repository (the original). Then, I'll create a PR to merge my branch with this repository's branch. Since the code is broken (circular imports and breaking errors), I don't want to merge the code into the main
branch.
You can also clone dishb/student_management_system
and switch to the modular-code
branch to view the code and play around with it.
To fix the circular imports, you'd have to change the way data/GUI classes are given to other GUI classes.
EDIT: Just saw the gui_organization branch, I'll merge my changes with #39.
Task to modify graphical code logic outside of just one file.
@dishb - I say we make this priority #1. I really want to make the graphical interface logic seamless. Then maybe we can start up a new repo with a new idea? Let me know your thoughts.