And the reason I like the most: while you're unit testing fuses, you can set
"self" in the test harness so that the fuse submits to a page that will
simply display all the variables set by the fuse being tested. A really
simple test harness would look like this:

<cfset self = "ShowVariables.cfm">

<cfset attributes.XFA.submitForm = "">
<cfset attributes.XFA.cancel = "">

<cfinclude template="dspEditInfo.cfm">

Of course there are ways around these issues without using self, but I find
self to be the easiest and a little more elegant. Plus, it's a little less
typing--such a deal!!

Hal Helms
== See ColdFusionTraining.com for info on "Best Practices with ColdFusion &
Fusebox" training ==


-----Original Message-----
From: John Quarto-vonTivadar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 2:13 AM
To: Fusebox
Subject: Re: Question: Why the change from RFA to XFA method?


> > hey, remember when Hal converted everyone to use "#self#" or
> > "#request.self#" in CFLOCATIONs and FORM ACTIONs ? It is the same
> > idea. You
> > give up very little but gain quite a lot.
>
> Umm, no I don't remember that.
>
> Why use #self# instead of index.cfm? Sure, it's less characters, but I'd
> have to edit my ctrl-1 snippet to change it. Please convince me to use
> #self# instead of index.cfm.
>
> NAT

ok, you have a client who you've already finished the job for, who has a new
boss that decrees that all the web server default documents will be called
"default.*" rather than "index.*".  With Hal's way, one change is made in
one place (MyGlobals.cfm). Your way, you have to reach into every template
of the entire app

ok here is an even better idea. In a fit of madness, you want to have have
two fuseboxes in the same directory. Both are already written, you jsut want
them to exist in the same spot. Hal's way, his madness is easily patronized.
One switch to one variable in one file, plus renaming one of his index.cfm
to default.cfm, or somesuch. Your way you descend further into the depths of
insanity.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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