I think that one solution is
1. Just having one Circuits.cfm in home application and including it in
app_globals.cfm this eliminates naming conflicts.

2. Defining each circuit as a standalone circuit. Like
<cfset request.Circuits.con = "Connection">
<cfset request.Circuits.foo = "fooDirectory">

And eleminating defining them dependable on their parents like

<cfset request.con = "myParent/Connection"> <!--- this is not good at
all --->

3. Defining a reserved circuit application name something like
"ThisFuseBox". That will allow you to send fuseactions from parent to son or
from parent to parent directly as long as parent may be a home application
or circuit app..

It makes circuit applications so portable. Why should I notify all of world
when I'm going to send a message to son of my circuit application or to that
circuit? - Have any body thought about it? I'm going to put this new idea
into action . Is there something that I missed?

The final application may look something like this,


<cf_prepareFuseactionSomehow>

<cfswtich expression="#attributes.fuseaction#">

        <cfcase value = "doSomething">
                <!--- this XFA will come back to another circuit through home app 
there's
                        nothing special about it now --->
                <cfset attributes.XFA.onJob1 = "anotherParent.someJob">

                <!--- "this XFA will be send to son of current circuit without 
involving
                        in parent or home app cause it's an internal task of this 
circuit --->
                <cfset attributes.XFA.onJob2 = "ThisFuseBox.someJob">

                <!--- this one will be sent to son of son of this circuit and finnaly
                        parent of this circuit have not to know anything about internal
                        architect of this circuit. --->
                <cfset attributes.XFA.onJob2 = "ThisFuseBox.son.someJob">
                <cfinclude template="dsp_something.cfm">
        </cfcase>

</cfswtich>

note: "ThisFuseBox" is a magical circuit name that will send following
fuseaction without involving parent.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to