0

I am trying to implement JavaFX desktop application with MVC (Model-View-Controller) architectural pattern. So I've got Models and Controllers. But the problem is that using FXML loader is causing the thing that Controllers keeps all nodes and controls, so it's view related staff. So my question is what the View objects should contain in this example?

masterofdisaster
  • 1,079
  • 1
  • 12
  • 27
  • Well, MVC is quite an old architecture and there are so many variations. For the people designing JavaFX, they decided that the controller holding UI node references are perfectly fine, because they told everyone that the nodes are *injected* in, so the controllers are technically not coupled with the actual View. – Jai Dec 07 '17 at 06:46
  • 3
    I would say that the View is simply... the FXML. – Jai Dec 07 '17 at 06:48
  • Related question: https://stackoverflow.com/questions/32342864/applying-mvc-with-javafx – James_D Dec 07 '17 at 15:54

0 Answers0