Simon -

While I agree with you that validating an object vs. validating form data are completely different, why would you ever have an invalid object that needs validating?  Should the data be validated (via the form data validator) before the data is passed to the object's constructor or setter methods?   The only 'link' between a form data validator object and a business object is the fact that the form validator object knows to look for and validate the certain data fields that then go into that business object.

-- Jeff


From: Simon Horwith <[EMAIL PROTECTED]>
Sent: Tuesday, March 08, 2005 4:01 PM
To: [email protected]
Subject: Re: [CFCDev] Is Decorator What I Need or Just Extends?


I don't like this idea of "form validators".  Validation by an object should be performed on other objects.  After all, data collected by a form, if it's used for anything, should be stored in an object somewhere.  The data being collected via a form(s) is still being validated either way, but validating forms and validating objects are very different ideas in the context of the thought process behind how to approach the requirements at hand.

~Simon
Simon Horwith CIO, AboutWeb - http://www.aboutweb.com Editor-in-Chief, ColdFusion Developers Journal Member of Team Macromedia Macromedia Certified Master Instructor Blog - http://www.horwith.com 


Dawson, Michael wrote:
However, a SpecializedFormValidator is a FormValidator.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of GroupOne Dev.
Sent: Tuesday, March 08, 2005 1:54 PM
To: [email protected]
Subject: re: [CFCDev] Is Decorator What I Need or Just Extends?

I have wondered what the right way to go about this is as well.  However, as a partial answer, I don't believe inheritance or 'extending' an object is the right way.  Inheritance says that a sportsCar object is a specialized car object which is a specialized vehicle object.  A set of validation routines are not specialized versions of anything and thus don't follow an inheritance model.

-- Jeff
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.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' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


Reply via email to