I am in agreement. I think that I'm drifting strongly toward the "two objects" approach, simple transfer objects (which are basically typed structures), and business objects which have getters and setters for properties as needed, handle their own validation, and perform other business logic as necessary. In my mind I see a transfer object factory, which builds and returns transfer objects. From there, nothing goes from the UI into the model unless it is a TO, and nothing comes out of the model except TOs and other non-object data types (queries, arrays, strings, etc.). In other words, business objects aren't used by the view (because they may well be public methods in a BO that you don't want the view mucking with. By giving it a dumb TO the view gets the data with no chance of causing a ruckus).
On 9/1/05, wolf2k5 <[EMAIL PROTECTED]> wrote: > On 9/1/05, Brian Kotek <[EMAIL PROTECTED]> wrote: > > I'm curious, if you want to validate your BO before, say, you send it > > to a DAO, are you concerned about instantiating a potentially "heavy" > > CFC just to set for valid data? I'm just curious. On advantage I can > > see to having a "Bean" that validates itself before you create a BO is > > that you avoid unnecessarily creating a complex BO if the data isn't > > valid. I know in general we shouldn't design around possible > > performance issues but rather actual performance issues, I just > > thought I'd get your take. > > Quick question: is a bean and a business object (BO) the same kind of object? > > It looks so according to the following blog post: > <http://www.barneyb.com/blog/archives/000310.jsp> > > Thanks. > > > ---------------------------------------------------------- > 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] > > > ---------------------------------------------------------- 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]
