Well I don't know Luke, Jeff,

One of the reasons for the development of XFB is to allow complete circuit 
apps to be built as stand-alone, and then integrated later into higher-level 
home apps.  This cannot happen unless you put EVERYTHING that CircuitA needs 
into CircuitA's myGlobals.cfm.

The idea is that every circuit has everything that it needs to stand alone, 
but that it can also inherit properties from higher-level when called as 
part of the higher home app.

So when I build a new circuit app, I include a full myGlobals, with some 
vanilla settings from the very beginning.  I use CFPARAM and CFSET to ensure 
that properties can be inherited or overridden as required.

Then when I have built and tested the circuit stand-alone, I plug it into 
the home app, and lo-and-behold, it suddenly inherits my site-wide header, 
footers, error messages, etc.

If you rely on a single myGlobals for your entire site, then you will have 
to fiddle with that file every time you add a new circuit that requires some 
new variables, etc.  That's a little dangerous.

Anyway, that's my take on it.  XFB allows circuits and home apps to 
stand-alone or integrate at all kinds of levels.  That cannot happen without 
a "complete" myGlobals for each circuit.

But I agree, it might seem a little counter-intuitive ;-)

Best of luck,
LeeBB
http://bjork.net

>From: "Jeff Peters" <[EMAIL PROTECTED]>
>
>Your instincts are accurate, Luke.  myGlobals.cfm shouldn't be duplicated
>throughout the site.  Rather, each circuit's file should set variables
>particular to that circuit.  Variables set by the parent circuit will be
>inherited by all children.  Each circuit has its own myGlobals.cfm to allow 
>it
>to function either as a standalone module or as a circuit in a different
>application, should you decide to reuse the circuit at some point.
>
>- Jeff
>
>On 17 May 2001, at 11:00, Luke Bartholomew wrote:
....
> > Forgive me if I have missed something simple, but this does seem more
> > manageable. Why can you not have one MyGlobals.cfm file and the location 
>to
> > this file is set up in the circuits.cfm file (obviously being the root 
>of
> > the application) and then use app_locals.cfm (or MyLocals.cfm) for all 
>the
> > variables relating to any specific fusebox. Then you could ensure that 
>it
> > would only load once. Please put me straight if I am totally off track.
> >
....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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