I use both methods where they make sense. For instance, we have objects which store configuration information - these are stateful (in fact, they're singletons). We have other objects which are used to connect to stock pricing services - these all conform to the same interface (or same base class in CF) and they are stateful as well.
The main API into our system, however, is not stateful - you do indeed pass the key arguments into each method on every call. This is done for several reasons, among them being flexibility. The nice part is that we can use the API both for our own ends _and_ expose the entire as an API as a WebService for our clients without having to rewrite anything. Since WebServices, by definition, are not stateful, our API cannot be either. Hope that helps! Roland -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dawson, Michael Sent: Friday, November 19, 2004 11:28 AM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Validation Roland, I have another related question. When you created CFCs, are they stateful in that they store data for the duration of the request or do you use them as mere function libraries? In other words, do you pass arguments to each and every method that is declared in the CFC? Thanks M!ke -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roland Collins Sent: Wednesday, November 17, 2004 3:00 PM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Validation Uh-oh - I hope I haven't made you into a bean maniac :) That was actually one of the _few_ places I would ever use a bean! Beans/DTOs are great for moving data between platforms and systems, but that's the only place I use them. When I'm working in CF, my methods are "parameters in, queries out". This saves the overhead of serializing and de-serializing beans on every call, which can potentially be a large bottleneck. Roland ---------------------------------------------------------- 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] ---------------------------------------------------------- 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]
