Doug is right, the idea is that you keep your logic and presentation separate. If you want all the forms and things to be reusable, keep them out of your CFC's and build a CFM file, this can then be called a custom tag, or with a <cfinclude> at any point in the application.
Have a read of this http://www.adobe.com/devnet/coldfusion/articles/oo_interface.html its what got me started when I was first using CFC's and wanted to move to a more oo based interface. Rob -----Original Message----- From: Doug Brown [mailto:[EMAIL PROTECTED] Sent: 08 March 2007 12:33 To: CF-Talk Subject: RE: bad cfc practice but why? Richard If that is what you are looking for, then what you are talking about would be a custom tag. CFC's are only available during the call to one of it's functions and cannot be <cfincluded> as a custom tag. There is nothing stopping you from using the old way of combining logic and presentation though in a regular cfm file. Doug -----Original Message----- From: Richard Cooper [mailto:[EMAIL PROTECTED] Sent: Thursday, March 08, 2007 3:42 AM To: CF-Talk Subject: bad cfc practice but why? Hi all, I've been using CFC's for a short while now and I'm really liking them. I can really speed up developments now by reusing code. Thing is I know I'm not supposed to put any presentation stuff in them. But say for example I had a poll cfc. I can run all of the actions through the CFC fine, but why not add some optional basic html (i.e. form & results) so that if wanted, the whole poll could be encapsulated within the one file and in theory could be added to any site with just a couple of lines of code. If the basic form & results didn't suit I could then go for a tailored option for the sites that needed it but all would still be based on the one cfc. So would this a bad thing and why? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271991 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

