I echo what Barney said....but i also see a valid point in what Micheal is saying i think....if I have a CFC called form_validator.cfc I should be able to use it on a form...but I think that kinda defeats some of the concepts that CFC are supposed to be used for...its like making a CSS class RedHeader...which yes i am ashamed to say we have IDs like that yes IDs not classes IDs we use IDs more than once...becuase that makes completely good sense ;)
Adam H On Mon, 17 Jan 2005 15:19:01 -0800, Barney Boisvert <[EMAIL PROTECTED]> wrote: > 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. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware: a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190862 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

