On 2/24/07, Marc <[EMAIL PROTECTED]> wrote:
"...The nice thing is that, by using a TO, other parts of the application can't inadvertently call "business methods" on your Bean. The downside is, it's more objects to create (even though Reactor creates them for you)..." If you have a moment, would you mind going into more detail (perhaps with a real-world example?) on how using a TO prevents "other parts of the application from inadvertently calling 'business methods' on your Bean" ?
Well, how I've used them is thus: I used to use queries, vs. objects, so when I output, I'd do something like: #personQuery.firstName# I was bummed at first, to think a simple search and replace wouldn't "fix" existing code (I don't consider regular expression searches simple, sadly). I didn't want to: personRecord.getFirstName() everywhere, basically. And then I seen Transfer Objects-- Perfect! If you use the transfer object, instead of the record object, then you can do: #personTO.firstName# And, it *feels* like less overhead- because in most places, all I need is a static variable, so a function call seems to be a bit overkill, if that makes sense. I don't want to change anything, I want plain values. eh. But the separation of logic sounds good, and I think I've heard that you'd use them for remote'n, or some such, too. Some change, :D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
