Hi,
I am just starting to put together a new app using FB5.1 and Reactor and
I would like to follow Brian's advice and add a service layer (and
possibly and remoting layer) between fb and reactor and I have a couple
of questions:
Do I set the reactorFactory into the application scope and then
reference this from within my service layer cfc's? Or is there a better way?
Do I need to create different service layer cfc's, for example, for
category, product, customer etc? And do I then split these further into
a Manager, Gateway setup?
I know a lot of this is subjective and I guess it can be done in any
number of ways - but this is where I am still learning, so just one way
would be good to get me started.
Could someone let me know if the above sounds about right and any
example snippets/file structure. One thing I am about to try is the
following:
fusebox.appinit.cfm:
application.reactor = createObject(theusual).init(config)
Then in my categoryManager.cfc:
<cffunction name="init" displayname="Initialise the service layer"
access="public" output="false" returntype="com.categoryManager">
<cfargument name="reactor" type="reactor.reactorFactory" required="true" />
<cfset variables.local = StructNew() />
<cfset variables.local.reactor = arguments.reactor />
<cfreturn this />
</cffunction>
Would it be better to do this instead?:
<cffunction name="init" displayname="Initialise the service layer"
access="public" output="false" returntype="com.categoryManager">
<cfset variables.local = StructNew() />
<cfset variables.local.reactor = application.reactor />
<cfreturn this />
</cffunction>
Any help would be very much appreciated.
Cheers,
Dave
--
David Phipps, Director
[EMAIL PROTECTED]
Chapel Studios / London
T +44 (0)20 7100 6980 F +44 (0)20 7100 6981 M +44 (0)7765 240899
New Broad Street House, 35 New Broad Street, London, EC2M 1NH, United
Kingdom
Visit our website: http://www.chapel-studios.co.uk
_____________________________________________________________________________
Chapel Studios is a limited company registered in England. The
information in this email is confidential, intended solely for the
addressee, and may be legally privileged. If you are not the addressee
or authorized to receive this for the addressee, you must not use, copy,
disclose or take any action based upon this message or any information
herein. If you have received this message in error, please advise
the sender immediately by reply e-mail.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --