Ok, so how / where do we encapsulate all validation, incorrectly typed arguments, invalid arguments, missing arguments and who knows what else. I'm liking Spikes idea of a separate Validation object more and more.
I never thought about a date of birth in the future ... "I was born in the future and i never looked back ..." n :) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Joe Rinehart Sent: Thursday, August 12, 2004 7:08 PM To: [EMAIL PROTECTED] Subject: Re: [CFCDev] type validation / try catch blocks Hey Nando, IMO, it's not at all a business object's duty to handle improperly typed arguments being passed into it. Its only concerns towards validity should be validating the value of a properly typed argument in regards to its own business logic. I.e., if person.cfc shouldn't accept a birthdate in the future, setBirthDate(date birthdate) should insure that this doesn't occur. Personally, I'd have it cfThrow an error on such a case, or have it return false. -joe ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
