JavaFX - the right way to use Properties with domain objects
- by pjm56
JavaFX has provided a bunch of new Property objects, such as javafx.beans.property.DoubleProperty which allow you to define fields which can be automatically observed and synchronised.
In many JFX examples, the MVC model class has a number of these Property fields, which can then bind automatically to the view.
However, this seems to be encouraging us to put JFX properties into our Domain objects (if you assume that the Model class is going to be a domain object), which strikes me as a poor separation of concerns (i.e. putting GUI code in the Domain).
Has anyone seen this problem being solved in 'real life' and, if so, how was it done?