I have set up my Gateways with two ways of behaving. I return a query object for the multiple rows. I also have an optional parameter for any of my queries to populate an array of beans to exist in the instance scope of the gateway.
That way I can use the query object to loop through if I find it more efficient (or for output). Or I can loop through the array and perform various DAO methods on the individual records. ----------------------------------- Gerry Gurevich Application Development NIEHS ITSS Contractor Lockheed Martin Information Technology 919-361-5444 ext 311 -----Original Message----- From: Peter J. Farrell [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 2:10 PM To: [email protected] Subject: Re: [CFCDev] DAO vs. Gateway? Kurt Wiersma said the following on 3/1/2006 12:52 PM: > Like Chris Scott, I have found that the Java convention seems to be > having all the code in a DAO class. In my CF apps I have found I > really like having the gateway separate because in Java I have found > my DAOs get huge with all the different methods that sometimes have to > be added for reporting purposes. > > --Kurt Ditto! Although I don't do any Java developing, I have found that DAO classes with everything gets unwieldy after a bit of time. Also, I like the idea of having my DAO access single records, while the Gateway is one or more. Secondly, typically my DAOs return populated beans while the Gateways returns cf query objects. .Peter -- Peter J. Farrell :: Maestro Publishing Member Team Mach-II :: Member Team Fusion http://blog.maestropublishing.com Create boilerplate beans and transfer objects for ColdFusion! Fire up a cup of Rooibos! http://rooibos.maestropublishing.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). 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). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
