Just to throw in my very humble 2 cents, I do not have save() as a method of any of my objects. I don't believe an object should be able to persist itself. (Kind of like the terminator). I create persister objects that handle saving to the dB. These persister objects take the type of object to persist with a setObjToPerisit() getObjectToPersist(). That way if my data platform changes, I don't have to revisit the objects themselves, I just have to write a new persister method for that type of object. In my application each object has a corresponding persistor type object that has a bunch of persist methods saveSQLServer, saveACCESS, saveWDDX, saveCSV, saveORACLE, etc. Just a thought.
Take care, Justin -----Original Message----- From: Phillip Cave [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 7:51 AM To: [EMAIL PROTECTED] Subject: [CFCDev] Data validation Where is the best place to handle data validation in an object? Should an object's Save() method be responsible for validating it's internal members before actually saving or should the calling program call a Validate() method before attempting to save? Any advice is appreciated. Thanks, Phillip -- Phillip Cave Director, ColdFusion Development Macromedia Certified ColdFusion Developer Carol/Trevelyan Strategy Group 202.448.5212 ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word '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 word '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]