This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
we have a application with serval form steps to collect data from a customer in a certain application in the financial surroundings.
so there is no need for a typical mvc application, because it's just collecting and validating data and log them into xml and database.
the problem is that the validation is quite complex and the visibilty of the fields are dependent form other formfields.
the next problem is that the application must be very felxible that means that f.e. a field could be moved to another step of the application, new fields must be easily integrated etc...
so my problem is that i couldn't find any pattern or framework that support this kind of application.
if i have a look to frameworks and validation concepts in jav - to tell the truth - it makes me a bit scary about flexibilty ,maintainability aside of typing my fingertips bloody.
so is there any concept / desgin pattern or framework that supports this aspect.
and the validation and data concept must be reused by a webservice!
i could imagine the application with jsf but without a typical managed bean buit a kind of formhandler or the help of other - more dynamical - languages like jruby.
Yes, there's a design paradigm geared towards inputting, validating and storing data. It's called MVC.
JSF isn't really that hard for the most part. In fact, it's so easy that an incredibly large number of people seem to feel obligated to develop overly-complex ways of doing things in JSF, perhaps because they don't believe that it can really be that simple.
In the case of basic data input/editing, JSF supports 2 levels of validation. Basic syntactic validation can be done by the JSF framework using specifications such as validator elements on input controls and built-in validations attributes such as 'required="true"'. Semantic validation such as cross-field checking is a little harder. Sometimes it can be done with listener methods, but often the easiest thing to do is do the semantic validation in an action processor that bounces back the edit screen with error messages until all the semantic conditions are met.
An IDE is no substitute for an Intelligent Developer.
I find it odd that you would make that assertion and then follow it up with:
the application must be very felxible that means that f.e. a field could be moved to another step of the application, new fields must be easily integrated etc...
Using MVC doesn't guarantee maintainability or extensibility but not using it can often have the opposite effect.
I recommend you take a long look at Facelets templating. And, possibly, RichFaces for building your pages. Couple those with a well thought-out overall design.
I, personally, haven't done much in the way of web services but I suspect the JSF validation isn't going to be of much use to you there. You'll need server-side validation within the web-service components themselves rather than in the JSF ViewHandler which likely would not be invoked for web-service calls.