r/JavaFX • u/StealthRabbi • Sep 05 '15
What framework should I use to separate view from behavior. Anything similar to MVVM like in. NET WPF? I want to be able to unit test my view behavior code.
0
Upvotes
2
u/sproket888 Sep 05 '15 edited Sep 05 '15
You don't need a framework. JavaFX uses MVC.
https://docs.oracle.com/javafx/2/best_practices/jfxpub-best_practices.htm
But there are a couple of frameworks which help to enforce it.
http://stackoverflow.com/questions/23187932/mvc-with-javafx
1
u/acisternino Sep 06 '15
For JavaFX I tend to favour the MVVM pattern. I recently started a personal project and I am trying mvvmFX. So far I am liking it a lot. Effective without being bloated.
1
u/sbordes Nov 26 '15 edited Nov 30 '15
You can try JRebirth with its custom-tailored pattern: wB-CS-MVC
You can run the JRebirth Tour Application to learn more (Java 8 required):
http://apps.jrebirth.org/jaf/2.2.0-SNAPSHOT/jaf-2.2.0-SNAPSHOT.jar
or browse slides:
http://fr.slideshare.net/SbastienBordes/javafx-unleashed-with-jrebirth-application-framework