0

I am rewriting a multi-user MS Access App. (split Front-end/Back-end). I am becoming comfortable with Java and JavaFX but the Class vs Module approach is puzzling me from a design point of view;

MS Access Front-end opens with a Switchboard with 20 buttons. Each button closes the switchboard and opens a specific purpose form, and when they are finished back to the Main form - back and forward forms. It works well.

How to approach coding this using classes?

  1. Should I use a separate class for each stage which seems obvious to me? and
  2. is there best-practice method that determines whether one should swap between Stages or Scenes..? All 'forms' currently contain distinctly different content.

Some expert advice might save me a heap of effort and give me some confidence. ..so nice to leave Access and VBA behind.

Rod Wenban
  • 5
  • 1
  • 5
  • Do you have to open up a new "Window" on each button? Have you looked into `TabPane` or using a `StackPane`? You could have buttons on the left side for example, and an entire `Pane` switched on the right on each button press. Kind of like this? https://stackoverflow.com/questions/8309802/how-can-i-implement-the-functionality-of-awt-cardlayout-in-my-javafx-2-0-applica/12010272 – trilogy Oct 09 '18 at 13:43
  • It's probably time for you to take a look at different MVC ideas. I personally like [this](https://stackoverflow.com/questions/32342864/applying-mvc-with-javafx) explained by @James_D. – SedJ601 Oct 09 '18 at 13:53
  • https://stackoverflow.com/questions/40117925/javafx-many-static-fxml-controllers/40118129#40118129 – SedJ601 Oct 09 '18 at 13:53
  • Tks to you both. I might look at TabPane & Stackpane. MVC & design is new to me . Tutorials Point's discusson on [Design Patterns] (https://www.tutorialspoint.com/design_pattern/index.htm) I'll look at those. I'll also explore opening & closing stages from each other; eg Start from Stage 1 instantiate & open Stage2 which automatically closes Stage1, when users are finished with stage 2 open stage 1 (which closes Stage 2) etc. Obviously Stage 1 has the ability to go to any of 20 stages using that same approach. Being data bound I don't want all the stages open at once. – Rod Wenban Oct 09 '18 at 21:41

0 Answers0