Dave, I'm going to cop-out and go with "it depends." If it meets your needs, I'd go ahead and pass your struct. If at some point in the future you need a formal, <cfproperty>'d TO, it shouldn't be hard to refactor to it.
For most things, I don't really see that need for the TO or the harm in just passing the Bean itself along to begin with - why is some sort of TO (your struct) necessary to begin with? Would your needs be met by just passing the Bean back to your view? -Joe On 6/2/05, Dave Merrill <[EMAIL PROTECTED]> wrote: > Thanks for chiming in. > > Would you pass that variables.instance struct to a view-like display object > directly? Or would you wrap it as an object with public instance data? Or > with private data and getters and setters that the display object would use? > > Dave Merrill > > > Pete Farrell's MachII Bean Creator (bit of a misnomer, since it's > > a bean creator and has nothing specifically to do with MachII > > creates all its data in variables.instance. I do this frequently > > as well. There's several advantages, the largest of which is the > > ability to grab all the instance data at once without having to > > filter out the methods (which are treated in the variables/this > > scopes as struct keys). > > > > I've also been making heavy use of collection classes in my > > current app and they're very nice as well. They've got add, > > exists, delete, and get methods that all keep the data at variables.data. > > > > While sometimes this isn't the best solution, it's certainly a > > valid one for many, many situations. > > > > Laterz, > > J > > > > PS - also look up the form validation thread since there were a > > couple important posts there before the new thread got started.> > > > > On 6/1/05, Kerry <[EMAIL PROTECTED]> wrote: > > you might want to lookup thread(s): > > > > [CFCDev] Generic Beans (was: LTOs (was: Form Validation)) > > > > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > CFCDev is supported by New Atlanta, makers of BlueDragon > http://www.newatlanta.com/products/bluedragon/index.cfm > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > > > -- Get Glued! The Model-Glue ColdFusion Framework http://www.model-glue.com ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
