Since TOs are usually used to go from the business layer outward, the form scope isn't going to work in most scenarios. You could use it directly, but I'd copy the relevant fields into a new struct and pass that. By doing that extra step, you'll avoid accidentally passing in any unintended values (which might exist as other form fields you weren't aware of), and make the app easier to follow. Other than that, the first paragraph is just about right.
I'd say that the simplest app would just have beans, and they'd be passed all around. No formal separation of tiers in the app, though there may be separation in some ways. I'd hesitate to say you're using your bean as a TO, because you're not, you just skipping using TOs at all. Next step would be to use Transfer Structs (to coin a phrase), because that does allows you to formally separate each tier from the others, and keep the BOs within the business layer. The final step woudl be to use fully encapsualted objects for TOs. cheers, barneyb On Fri, 7 Jan 2005 09:14:01 +1100, Patrick Branley <[EMAIL PROTECTED]> wrote: > barney, > > to summarise what you just mentioned about TO's is that it its most > simple form a TO can be a struct (maybe even the form scope ?) ...but > a more robust solution is to use a separate cfc to represent the TO > with a series of getter methods to provide access to the data. > > sound about right ? > > Next question... > > Can a bean also act as a TO or are they two different things ? In > terms of evolution of your app would the order of complexity be > > struct -> bean (posing as a TO) -> custom built TO ? > > Pat -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 9 invites. ---------------------------------------------------------- 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 www.mail-archive.com/[email protected]
