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.
--------------------------
 
So Simeon, if I understand what you are saying, then i *ONLY* need the ReactorFactory in application scope, and it takes care of additional efficiencies like storing other things in application scope as needed?
 
And, if I understand most of what else has been discussed here, then my model circuit will be one (or several) xml files for the model, all of which point to actX files, all of which will contain simply calls to reactor?
 
What's troubling me at this point is the number of files I have to bounce around to, just to write one fuseaction...
 
1.  Create XML block in controller file
 
2.  Create XML block in model file, create one or more actX files, write code there
 
3.  Create XML block in view file, create one or more dspX files, write code there
 
This amounts to having at least 5 files to work with at all times... three of which have the same name, but are in different directories.  I've started getting used to this, but it still just feels like I'm bouncing around a LOT.  Has anyone else felt this way, or am I just a sissy?
 
Perhaps the fact that Simeon has felt the urge to 'break from best practice' by putting reactor calls right in the model XML file because it's "good enough" and really is faster - something I can identify with - is indicative of a potential problem with having to work with so many files at once... which for someone new to fusebox could be a source of confusion and frustration...?
 
I know, I know, this is the nature of MVC... we're assembling encapsulated "modules" here... but it just feels a little heavy writing code nowadays...  maybe I'll get used to it.
 
m

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

Reply via email to