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 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dawson, Michael Sent: Wednesday, November 17, 2004 1:21 PM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Validation You know what... The more I re-read these past messages, I relized a bean is closer, in concept, to a DTO than a BO. Several weeks ago Roland helped me on a VB project. He showed me the notion of a user-related class which contained only properties, setters and getters, but no logic other than what was needed to store and retrieve the property values. Now that I see that the VB class was basically a bean, things are starting to click. It is clear that passing a bean around to different methods is much easier than passing all the argument as Barney mentioned a few days ago. I'm still coming around... I need to fight the tendency to wrap too much code, and functionality, in a single object. Fortunately, I should be attending an "Intro to Java OOP concepts for Procedural Programmers" course soon. I hope to put more things together by attending that course. Thanks -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dawson, Michael Sent: Wednesday, November 17, 2004 12:12 PM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Validation Back to this thread for a few moments... >>Your DTO should have every setter using 'string' as the argument type, because that's what every form variable is. Your BO, on the other hand, should have appropriate types. For example, the DOB field would be of type 'date'. This quickly demonstrates the need for two-stage validation, because the form field for DOB could happily contain "tee-hee", which would cause the setter on the BO to fail (because it's not a date). Barney, would you equate the BO to a bean? If not, how do the BO and bean fit into a methodology? Can you type out a flow to demonstrate the layers? Thanks M!ke ---------------------------------------------------------- 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] ---------------------------------------------------------- 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]
