Simeon,

Could you give a quick example of how you do your set calls in your model circuit? I tried a while back and couldn't get it to work so I just started putting the Reactor calls into fuses.

Thanks,

Ray

On 8/15/06, Simeon Bateman <[EMAIL PROTECTED]> wrote:
Hey Marc,

The reactorFactory does a pretty good job of caching the objects that need to internally.  By letting it do its job you dont have to worry about when objects need to be updated into your application scope.  When you ask for a gateway from the factory, the first time it will create it if it needs to.  Each request for it afterwards with get you a cached copy.

In most of my fb apps, I will just shortcut my calls by placing set calls in the xml of my model circuit.  In general I consider this bad practice because (without lexicons and such) you cant catch errors and you have limited choices in what you can do from this point.  But I often find that making the calls from the xml is "good enough" and that its very simple to move this into an act_ fuse at a later point if I need more control.

Hope that helps in sorting out some of your confusion.  Good Luck.

Simeon



On 8/15/06, Marc Funaro < [EMAIL PROTECTED]> wrote:
I do have some questions... hopefully everyone can chime in at this point,
as it may very well cross the fusebox framework boundary into standard 'best
practices'.

I understand that storing the Reactor Factory in application scope is common
and desirable.  Wouldn't it also be desirable to store additional objects in
application scope, such as each gateway object, and each DAO object and
Record object too?

Using MVC with a simple app, with Reactor, is there still the three XML
files - controller, model, and view?  and then in the model XML file, is
that where calls to reactor objects are placed?  Or does the controller just
use reactor "directly" (which would seem to break the separation of MVC,
making it just "VC"?)

Sorry for the noob questions... this is a brand new site and this is all
relatively new technology, so I'm in a fog!

:)
m


________________________________

        From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]]
On Behalf Of Ray Buechler
        Sent: Tuesday, August 15, 2006 3:59 PM
        To: [email protected]
        Subject: Re: [Reactor for CF] Fusebox 5 Example


        Marc,

        I don't have a sample app to show you but I can tell you how I use
FB5 with Reactor. Nathan Strutz just released a FB5 Reactor Lexicon that you
can download here: http://www.dopefly.com/techblog/entry.cfm?entry=148 I
have not had a chance to mess around with it yet but it may be what you're
looking for.

        My "typical" FB5/Reactor set up goes something like this (I am using
a MVC approach):

        I am using an initialization fuse that I call in the fusebox.xml
file using the new <appinit> tag. In the initialization fuse I put an
instance of the Reactor Factory in the application scope.

        The only real thing that is different is that rather than using the
cfquery tag for CRUD type stuff I'm using reactor. So a typical fuse to list
all the records in a table would look like this:

        <!--- Create the gateway --->
        <cfset analystGateway = Application.Reactor.createGatew
        ay("Analyst") />

        <!--- Generates a list of analysts --->
        <cfset analystQuery = analystGateway.createQuery () />
        <cfset qAnalyst = analystGateway.getByQuery(analystQuery) />

        I have tried using the set tag in a fuseaction and could not get it
to work. In theory it should work but I've not had any luck and haven't
really messed with it in a while.

        Let me know if you have anymore questions.

        Ray



        On 8/15/06, Marc Funaro < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

                I need a fusebox 5/reactor example app... Is there one
available for
                download somewhere?

                Marc



                -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- --
                Reactor for ColdFusion Mailing List
                 [email protected] <mailto:[email protected]>
                Archives at:
http://www.mail-archive.com/reactor%40doughughes.net/
                -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- --





        -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- --
        Reactor for ColdFusion Mailing List
        [email protected]
        Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
        -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- --




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to