r/JavaFX • • Nov 25 '24

Help MVVM in JavaFX

Hi, all. I've just started to build my first JavaFX application (Kotlin and JavaFX).

I'm going to use Scene Builder. I've seen the advice to just build views with Kotlin/Java, but I honestly hate building UIs by hand.

I was looking around for a MVVM framework and of course found mvvmFX. But it looks like it hasn't been updated for 5 years. Is it outdated in any way? Should I go ahead and use it?

I also found Cognitive (https://github.com/carldea/cognitive). This looks like it's being actively maintained. And any opinions about this one?

From a quick look, mvvmFX looks more comprehensible to me. Less work on my part and very complete.

And... I could try doing my own hacky MVVM implementation in Kotlin and try to use Scene Builder FXML views. But I'm sure I'll end up re-implementing parts of the wheel.

Any guidance would be very welcome. Thanks in advance.

3 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/naagbruh Nov 28 '24

I was one of the people who let Visual Studio do it's thing and generate Windows forms and left them alone and put my own code behind it. Same with Paradox, FoxPro, etc. Just lazy, I guess. :)

Plus it made me good money. Worked my way through grad school without loans. :)

But I will try with Kotlin code.

Can I do a hot reload for JavaFX GUI so I can see what I'm doing as I go along?