JavaFX Form Validation
tbee at tbee.org
Wed Jun 13 03:08:55 PDT 2012
As I see it, if the validators in fact are separate classes that are applied to a data structure (BM, business process, client side backing bean), then it would be very well possible to have these validators in a separate project / artifact, that is both shared by the server and the client (given that the developers are smart enough to use identical data constructs on both sides). Then you would be able to reuse the validators.
On 13-6-2012 12:00, Randahl Fink Isaksen wrote:
> Jonathan, I think there is an important aspect of form validation which we have not yet discussed. In traditional web-based UI's, validating data at the UI layer may be considered sufficient, since the organization has total control over the UI layer validators, as they are executed server side. With JavaFX this is quite different, as the UI layer is running outside the server on an end user's PC.
> So, if the validity of certain fields is critical to system data integrity, it would be wrong to only run the validators in the JavaFX client application, since the application could have been modified, the network communication could have been compromised, etc. Consequently, the JavaFX validation system must be one, which allows rerunning the validators server-side, to ensure that developers will not have to rewrite validation code in multiple layers of the same application.
More information about the openjfx-dev