On Mon, 22 Nov 2004 11:41:12 +1100, Joel Nath <[EMAIL PROTECTED]> wrote: > userBean.cfc > newsBean.cfc > productsBean.cfc > > validation.cfc > DAO.cfc
Why would you have a validation CFC? And why would you have a generic DAO CFC? > am i correct in saying that i should validate my data before putting it in > the bean? No, normally you put the data into the bean and then validate it (usually people have a validate() method on their bean). > what is the best way of calling validation.cfc and dao.cfc and given that i > cant use "EXTEND" since validation "isnt-a" news related object or can i ?? Well, I'm not sure how you can have a generic validation CFC separate from user, news and products... > can i EXTEND validation.cfc off my userBean.cfc and have a Validation() > inside my userBean.cfc if required for custom validation else the inherited > Validation() in the validation.cfc should do the job ? No. The validation for each bean should be distinct so there would be no common base class. > also do i need a DAO.cfc for each section (.eg one for users, news and > products) or i common DAO.cfc should be good if i can get away with it. Possibly. It's usually simpler to have a DAO for each distinct type but if your CMS is managing arbitrary types you might be able to have a generic DAO for it. > Can the FORM scope struct variable be used instead of the BEAN object.... ? That would break encapsulation downstream. Best practice is to put your form scope variables into a bean and then refer to the bean everywhere. -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 1 invite "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ---------------------------------------------------------- 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 [EMAIL PROTECTED]
