RE: validate business data
Return Receipt Your RE: validate business data document : was Henry Molina/KRUGER received by: at: 03/17/2003 08:59:31 AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validate business data
We have a couple different approaches. But one is to create some custom validator Fields that can be plugged in to the validator. Then all errors, buisiness or otherwise, are done by the DynaValidatorForm. Makes our actions simpler. -Dennis On Fri, 2003-03-14 at 14:47, Dan Allen wrote: > *This message was transferred with a trial version of CommuniGate(tm) Pro* > Naturally all screening of data should be done by the > ActionForm/Validator interface, but when it comes time to looking > for duplicate usernames/emails or other such business conflicts, > this must be done in the business logic layer. > > How do most of you handle this? Do you create a validateData() > method in your Action class or is this something that the Model > objects should be able to handle? > > Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validate business data
Rick Reumann ([EMAIL PROTECTED]) wrote: > On Fri, 14 Mar 2003 15:47:57 -0600 > Dan Allen <[EMAIL PROTECTED]> wrote: > > > How do most of you handle this? Do you create a validateData() > > method in your Action class or is this something that the Model > > objects should be able to handle? > > Assuming you have the data in the correct form when you're action form > is populated, any other validation I believe should be done in the > business layer and throw an appropriate Exception which the action can > then handle. Excellent guidance. I will run with that for sure. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, <[EMAIL PROTECTED]> http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Windows: where do you want your data to disappear to today? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validate business data
Dan, In order to preserve a layered approach, there are 2 issues: 1) the display of errors 2) evaluating if an error has occurred In my Struts applications, I have a Business Logic Layer (BLL) that will always perform 2). In the Action class, I call the validation function to check for HTML form errors as well as calling the BLL to check of business rule errors (such as the duplicate emails). If an error is found, my action class will put ensure the error appears on the page which generated the error. The displaying of errors usually occurs through the application platform, so in this case, ensure that the error message and error handling is done by Struts. Using this approach, you can re-use your BLL for other applications without having Struts tie-ins. Aaron -Original Message- From: Dan Allen [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 1:48 PM To: Struts-User List Subject: validate business data Naturally all screening of data should be done by the ActionForm/Validator interface, but when it comes time to looking for duplicate usernames/emails or other such business conflicts, this must be done in the business logic layer. How do most of you handle this? Do you create a validateData() method in your Action class or is this something that the Model objects should be able to handle? Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, <[EMAIL PROTECTED]> http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Windows: where do you want your data to disappear to today? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validate business data
On Fri, 14 Mar 2003 15:47:57 -0600 Dan Allen <[EMAIL PROTECTED]> wrote: > How do most of you handle this? Do you create a validateData() > method in your Action class or is this something that the Model > objects should be able to handle? Assuming you have the data in the correct form when you're action form is populated, any other validation I believe should be done in the business layer and throw an appropriate Exception which the action can then handle. -- Rick Reumann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validate business data
Hi, What we have done in our application is created a busniess logic bean, so we create the instance of this bean in Action class and then get an ArrayList of all the messages ( error or display) and then put these messages in ActionErrors in Action class and forward it to jsp So we keep the business logic and struts totally independent Ashish --- Dan Allen <[EMAIL PROTECTED]> wrote: > Naturally all screening of data should be done by > the > ActionForm/Validator interface, but when it comes > time to looking > for duplicate usernames/emails or other such > business conflicts, > this must be done in the business logic layer. > > How do most of you handle this? Do you create a > validateData() > method in your Action class or is this something > that the Model > objects should be able to handle? > > Dan > > -- > - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > Daniel Allen, <[EMAIL PROTECTED]> > http://www.mojavelinux.com/ > - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > Windows: where do you want your data to disappear to > today? > - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validate business data
Naturally all screening of data should be done by the ActionForm/Validator interface, but when it comes time to looking for duplicate usernames/emails or other such business conflicts, this must be done in the business logic layer. How do most of you handle this? Do you create a validateData() method in your Action class or is this something that the Model objects should be able to handle? Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, <[EMAIL PROTECTED]> http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Windows: where do you want your data to disappear to today? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]