I'm working on something now using this approach.  Mostly because my
validation will require access to the DB.  How do others approach
this?

I'm doing a scheduling application, and before saving a schedule I
need to make sure people on the schedule are not scheduled already
somewhere else.  This is not something I can use primary keys for.

DK

On 12/7/05, Ben Nadel <[EMAIL PROTECTED]> wrote:
> I have been leaning towards putting my validation (I am new at this) inside
> of the DAO object. The DAO validate would accept some sort of entity bean
> and then return a validation error collection object:
>
> UserDAO.Validate(User)  - > Returns instance of
> extensions.components.ValidationErrorCollection
>
> Of course this is just theory for me at the moment, but what I like about it
> is that validation can happen in an organized format at the programmer's
> request.
>
> Plus, getting a standard collection interface is good for outputting the
> form errors to the end user.
>
> .......................
> Ben Nadel
> Web Developer
> Nylon Technology
> 6 West 14th Street
> New York, NY 10011
> 212.691.1134
> 212.691.3477 fax
> www.nylontechnology.com
>
> "Vote for Pedro"
>
> -----Original Message-----
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 07, 2005 10:48 AM
> To: CF-Talk
> Subject: Re: CFC design - data validation?
>
> Have a method called setemailaddress() that calls another method that
> validates the email address. If it validates, then save otherwise return an
> error message. My listserver CFC does this (among other things). One of the
> powers of CFCs is the ability to have clean organization of code.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226446
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to