Thanks for the tip. I have been unit testing all the DAO and gateway methods before calling them with the service.
So I should be OK at the service level with this approach. On Sun, May 25, 2008 at 11:27 PM, Zac Spitzer <[EMAIL PROTECTED]> wrote: > > just be aware when doing that, CF can sometimes throw somewhat > confusing error messages > > the variable approach whilst a little more verbose, is easier to debug > > On Mon, May 26, 2008 at 12:49 PM, Kevin Pepperman <[EMAIL PROTECTED]> > wrote: > > thanks for the help. I was thinking it was OK. But had to ask to feel > > confident. > > > > On Sun, May 25, 2008 at 10:15 PM, Dan Wilson <[EMAIL PROTECTED]> wrote: > >> > >> Either is fine. > >> > >> in the second example, where you just return the query, there is no > >> implicit variable created, thus nothing that could leak scope. > >> > >> You are smart to ask the question though. > >> > >> > >> Dan > >> > >> > >> > >> On 5/25/08, Kevin Pepperman <[EMAIL PROTECTED]> wrote: > >> > I have a question that I have not been able to find a good answer to. > >> > > >> > I am using a bean, service, gateway, DAO. > >> > > >> > All calls are done through the service layer. > >> > > >> > I know it is important to var scope query methods in the DAO and > >> > gateway. > >> > > >> > But does the service layer need to do the same? > >> > > >> > eg: in the service layer. > >> > > >> > <cffunction name="queryList"> > >> > <cfargument name="code" default="" /> > >> > <cfset var qry_list = "" /> > >> > <cfset qry_list = getGateway().queryList(arguments.code) /> > >> > <cfreturn qry_list /> > >> > </cffunction> > >> > > >> > or can I just return the query directly? > >> > > >> > <cffunction name="queryList"> > >> > <cfargument name="code" default="" /> > >> > <cfreturn getGateway().queryList(arguments.code) /> > >> > </cffunction> > >> > > >> > thanks ahead. > >> > > >> > > > >> > > >> > >> -- > >> Sent from Gmail for mobile | mobile.google.com > >> > >> "Come to the edge, he said. They said: We are afraid. Come to the > >> edge, he said. They came. He pushed them and they flew." > >> > >> Guillaume Apollinaire quotes > >> >> > > > > > > -- > Zac Spitzer - > http://zacster.blogspot.com (My Blog) > +61 405 847 168 > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
