+1 for Sam's approach below. Only difference is that I use the idea of custom data types which encapsulate all of the things that a "property as object" should know about itself. Because I can't code "everything as an object" in CF, I implement via a bunch of data type specific singletons that implement the (conceptual) DataType interface and are composed with a validation library bean for all of the heavy lifting.
Best Wishes, Peter On 3/1/07 7:07 AM, "Sammy Larbi" <[EMAIL PROTECTED]> wrote: > I don't see this as an either-or issue. I've not used this strategy in > CF, but in Java, I might create a Validator class which would know how > to validate very common things, like length, isnumber, isdate, and > such. Then, the model would compose an object of type Validator. But, > the key is, it would set its own validation rules to be followed in the > Validator object. Anything not common enough to make it into the > Validator would be performed in the bean itself. So basically, you > might have a routine like > You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
