Actually, you usually DO pass in server, application, session, and client variables into a CFC. Part of encapsulation is isolation from the environment. What if I switch from client to session variables? Do I really want to have to go change every CFC?
Same with your form CFCs. Chances are good they'll never be used for anything except form processing, but what if you need to expose a bit of functionality with a web service? Suddenly no more FORM scope. Oof. If you plan ahead and make your CFC just accept a struct parameter (which you can pass the FORM scope as), then you can just pass in your arguments from your web service method invocation, and not have to change anything. cheers, barneyb On Mon, 17 Jan 2005 18:07:50 -0500, Michael Dinowitz <[EMAIL PROTECTED]> wrote: > This is where I disagree with the whole OO approach and what people consider > no nos. I know that the form processor CFC always processes a form. I know > that a form will only be posted as a form, never as an URL. I know that the > CFC will only be used in a place where a form will be posted to. Why should > I do all the form variable validation outside the CFC that's supposed to > handle the form? Why do I have to set a cfinvokeargument to pass a form into > the CFC if I know that the form will exist for the CFC if it exists on the > page. Everything about that particular CFC says forms, so why do I have to > do extra work to use what the CFC was created to handle. > A CFC is part of a page environment. Do you pass in application, session and > client information to a CFC? No, because you know it exists. Why is it > different for Form and/or CGI information? > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 8 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190860 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54