JavaFX - the right way to use Properties with domain objects

Posted by pjm56 on Programmers See other posts from Programmers or by pjm56
Published on 2012-07-06T10:08:21Z Indexed on 2012/07/06 15:23 UTC
Read the original article Hit count: 273

Filed under:
|
|

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?

© Programmers or respective owner

Related posts about domain

Related posts about properties