| Think:
application.UserService.getUser(17)
Where UserService may use Reactor to fetch the user data and construct a User object, use a logger object to log the request for User #17 and the date and time, and send an instant message thru another IM Gateway CFC instance to user #17 (if they be online) to notify them that someone has tried to access their account.
That would be a UserService... something that has methods that tie other smaller, discreet objects together in a bundle.
Laterz, J
PS - I'm sick and my head hurts, no warranty is given for the above example in any way, shape or form. :P
------------------------------------------------ Jared C. Rypka-Hauer Continuum Media Group LLC http://www.web-relevant.com Member, Team Macromedia - ColdFusion
"That which does not kill me makes me stranger." - Yonah Schmeidler
On May 12, 2006, at 1:59 AM, Nick Tong - TalkWebSolutions.co.uk wrote: whoops, shouldn't.
Can you be explain in Lyman's terms what you mean by 'application-scoped service objects'? Is this just a phrase for objects that are put into the application scope?
Thanks
On 11/05/06, Brian Kotek < [EMAIL PROTECTED]> wrote: Most people do put Reactor into the application scope at application initialization. Or, more specifically, they pass it into the application-scoped service objects that will actually use it. Did you mean "any reason why I should" or "any reason why I *shouldn't*"? Regards, Brian Sorry newbe question and i can't find an archive for this list:
is there any reason why i should put reactor in the application scope so i don't have to instantiate it each page request:
i.e. application.cfm
<cfif not structKeyExists( application, 'appInitialized' )> <cflock name="appInitBlock" type="exclusive" timeout="10"> <cfif not structKeyExists( application, 'appInitialized' )> <!--- create the reactorFactory ---> <cfset application.Reactor = CreateObject("Component", "reactor.reactorFactory").init(expandPath("reactor.xml")) /> </cfif> </cflock> </cfif>
then any calls after i use the application scope: i.e. <cfset UserGateway = application.reactor.createGateway("User") />
thanks.
-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
-- Nick Tong
web: http://talkwebsolutions.co.uk blog: http://succor.co.uk shorturls: http://wapurl.co.uk -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ |