JavaFX - Many Static FXML Controllers

后端 未结 5 1224
囚心锁ツ
囚心锁ツ 2020-12-06 19:24

A JavaFX application exists and the application is starting from the Main.class file which extends Application:

  publ         


        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-06 20:05

    Actually the answer for this question seems a little bit complicated it has to do with MVC pattern and it's evolution until now.We will use MVP Pattern.

    After a long discussion i got a link on this website http://martinfowler.com/eaaDev/uiArchs.html defining the historical evolution of the different patterns used from the old ages of Smalltalk until now.


    The actually solution is using Model Viewer Presenter Pattern(MVP) which can be visually described using these images:

    For more you can read(http://www.wildcrest.com/Potel/Portfolio/mvp.pdf)


    For an example on JavaFX have a look on James_D answer here (Applying MVC With JavaFx)


    Last but not least have a look at the comments here:

    Finally:

    If anything is inaccurate feel free to edit.

提交回复
热议问题