vendredi 31 juillet 2015

How to implement MVP in JavaFX

Before some time, i started looking for a pattern to decouple UI from a logic of my app. I decided to use MVP, but there is one significant problem which i cant solve. How can i inject a instance of presenter into view, if classes that implements Application, are launched from static method. There is also no choice to launch specific instance of class implementing Application, so parameters in constructor are useless. Also i do not use FXML, my view class is coded in java.

PS: Sorry for my english, as it's not my native language

Aucun commentaire:

Enregistrer un commentaire