Beginning of Feb 2016, version 0.8 of the Dolphin Platform has been released. The version contains several bugfixes and some new features.
The biggest new feature is the support of Java Bean Validation (JSR-303). For this feature we introduce a new module to Dolphin Platform that you can easily be added to your application dependencies:
Once this is done you can use bean validation in the model layer. By doing so you can define your beans like this:
As you can see the @NotNull annotation is added to the property in the bean class. By doing so you can simply validate instances of the bean by using a Validator. Currently not all validation annotations are supported but this is just an open todo. At the moment the following annotations are supported:
For more information about the bean validation support in Dolphin Platform you should have a look at the read me.
For version 0.8 we added a lot of functionality to the JavaFX binding layer. Based on this it’s now possible to simply bind a JavaFX list to an observable list of the Dolphin Platform model layer. Only one line if code is needed for this:
Plus, we added support for converters. You can bind properties of lists of a different type to each other. This is interesting if you want to bind UI specific classes to the model layer. When using the JavaFX chart API the data model of the charts is defined by JavaFX specific classes. Since you don’t want to have this classes in the model layer that is shared between client and server you can simply define a converter and bind the model of a chart to your custom bean type. Using such a converter is as easy as a normal binding:
Next to this we added some minor features like new convenience methods in the ObservableList and fixed some bugs. A complete list of the changes can be found here.