Stable version 1.1.0 released
Today we have released the new version 1.1.0 of mvvmFX.
This time we have lots of new features added to the framework:
Commands
The most interesting new feature are the Commands.
With them you can now encapsulate actions in the ViewModel and
provide them to the View. Each Command has boolean properties showing if it is running
at the moment and if it isExecutable
. The latter can for example be used in the View to bind the
visibility of a button.
With CompositeCommand
s you can compose many commands so that all sub-commands are executed
when the composite command is triggered.
See the wiki page for a detailed explanation.
ModelWrapper
The second big feature is the ModelWrapper. This class can simplify the mapping
between the Model and the ViewModel for CRUD like applications.
Instead of duplicating the fields of a model class in the ViewModel you can now
use the ModelWrapper
that support reloading (copy values from Model to ViewModel),
resetting (set ViewModel to default values) and committing (copy values from ViewModel to Model).
In the wiki you can see a detailed example.
Others
Other interesting features are the possibility to inject the ResourceBundle into the ViewModel,
a CellFactory that simplifies the usage of mvvmFX views as items in a ListView
.
Utility modules
Additionally we have introduced two more Maven modules:
mvvmfx-utils contains utilities that are not directly related to MVVM but that are more
generally useful for JavaFX development.
We moved the SizeBindingsBuilder
and the ListenerManager
from the core module to this new module
to improve the cohesion of the core module.
mvvmfx-testing-utils contains utils that we used for testing purposes internally for
some time. Now these utils are available for the public.
The most interesting is the GCVerifier
that we are using for testing situations where Garbage Collection is important.
See the whole list of changes at github: https://github.com/sialcasa/mvvmFX/releases/tag/mvvmfx-1.1.0