JavaFX FXML is an XML format that enables you to compose JavaFX GUIs in a fashion similar to how you compose web GUIs in HTML.
Example:
So basically the GUI is buiild using FXML files. Every FXML file should have one controller in which you have direct access to the FXML items (like buttons, labels etc). I thought it's a good idea to store the FXML files on the client side. I don't know why, it seemed correct for me. Do you have another option? Please let me know. I'm willing to learn as much as possible since I haven't developed another client-server type app till now.
Ok, now I'm going to detail how my app should work. The user will have to login/sign up in the app first (like I've asked in the first post, I want to know where I should put the logic behind the log in mechanism. Like I said, the FXML controller should only be responsible for passing infos between the view and the service. Please tell me if my logic is good. So in the database I will have the table User.
After Sign up/ log in the app should show content specific to the category to which the user belongs (beginner / intermediate / advanced). The level of experience of the user will be determined by a Sign Up quiz.
Here comes another question. I will keep learning material in simple .txt files like:
I will have a filled called Structure.txt with the following format
ChapterName Lesson1 Lesson2...LessonN. So it will have multiple lines (one line for every chapter). I think this is a good approach for later modifications of the content (I won't have to modify the code, but only the files). So there will be one of this structure file for every category (3 in total). Next every lesson will be in its separate file like :
Lesson1.txt. When the user log in, the app should load the associated files based on user level and build the GUI. Now, where these files should be saved? I don't think it's a good idea to store on user side. And if I store them on server side, how do I do to load them from the client app? Should I have some methods in the server? For server side I ve seen that it usually uses a REST API for database operations. So should I implement these load_file operations in the REST API? Please make me understand.
In the database there will be another table, like user_completed_lessons which will information about the user progress, like when the user complete a lessons I will insert a record in this table (user id + lesson id). I will use this to change the GUI accordingly (like check marks on completed lessons).
There will be a
testing section too.. But I will not go into details. The mechanism is similar.
My biggest dilemmas are how to access the service in the client application and the part with loading files in th GUI.
I would appreciate if you could give some directions.
Thanks