Hal, you must be tired...
"Of course, it's 1.00 in the morning, so I might be missing
something!"
....you're measuring time in version numbers. Its 2.0 Patch .18 here.
-----Original Message-----
From: Hal Helms [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 1:10 AM
To: Fusebox
Subject: RE: Surveying the community
Here's my thinking on the subject: different strokes for different folks.
Catchy, huh -- and original, too!
No, seriously, here's what I'm thinking: I think the idea of calling the
queries independently of the fuse is fine, though I think it's an
organizational thing and introducing McCabe and complexity theory isn't
really helpful here. (Lee, go stand in the corner.) It's more a matter of
some folks like it; some don't.
In thinking about this, what I've come to think is that there are some cases
where the exit points of a fuse are integral to the fuse itself and others
where there is no internal logic that dictates exit fuseactions (XFAs). The
example for one with internal logic dictating XFAs I like to use is
actValidateLogin, where you will either have an exit point of
onSuccessfulLogin or onFailedLogin. In that case, I use this:
<cfcase value="validateLogin">
<cfset XFA.onSuccessfulLogin = "cat.mainMenu">
<cfset XFA.onFailedLogin = "usr.badLogin">
<cfinclude template="qryValidateLogin.cfm">
<cfinclude template="actValidateLogin.cfm">
</cfcase>
But what of the cases where the actFile is really generic--and can be used
in a number of cases? You could, of course, put XFA.continue in the act
file. I have been doing this mainly. Steve Nelson sometimes uses url_ files,
which solves the problem fine, but some might not like having a file that is
just a redirection.
I'm going to try something else out. I'm going to add this bit of code BELOW
my <cfswitch> statement:
<cfif IsDefined( 'XFA.onCompletion' )>
<cflocation url="#self#?fuseaction=#XFA.onCompletion#">
</cfif>
This lets you do something like this:
<cfcase value="CaseA">
<cfinclude template="actDoThis.cfm">
<cfinclude template="actDoThat.cfm">
<cfinclude template="dspHelloWorld.cfm">
</cfcase>
--- OR ---
<cfcase value="CaseB">
<cfset XFA.onCompletion = "main.doThisOtherFuseaction">
<cfinclude template="actDoThis.cfm">
<cfinclude template="actDoThat.cfm">
</cfcase>
It seems like that would simplify things, as you wouldn't need a url_ file,
but you would accomplish what is an admitted need -- to use files that
sometimes need to go places and othertimes don't. It would also remove a lot
of the need for <cflocation url=blah> stuff in the individual <cfcase>
statements. Of course, it's 1.00 in the morning, so I might be missing
something!
Hal Helms
Team Allaire
[ See www.halhelms.com <http://www.halhelms.com> for info on training
classes ]
-----Original Message-----
From: BORKMAN Lee [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 10:58 PM
To: Fusebox
Subject: RE: Surveying the community
Hey don't get me wrong. I'm not saying that Hal's XFB is complex. It was
just some "interesting" uses, or over-uses, of XFAs that were worrying me.
On your point about putting all the code in the index.cfm, I'm afraid that
wouldn't help the complexity measures - quite the opposite, in fact. You
can't get away from the innate complexity of a particular app, but you can
spread it around in sensible ways, so your pieces are maintainable. In
particular, there must be good reason to deliberately increase the
complexity. If Hal's XFB increases complexity at all (I don't believe it
does) then the benefits may well be worth it. On the other hand, using
extra CFCASEs and XFAs just to do a simple CFIF's job is increasing
complexity and for no discernible benefit.
You just seem to be equating your sample code with XFB. I am criticising
one, but not the other ;-)
Lee.
-----Original Message-----
From: John Quarto-vonTivadar [mailto:[EMAIL PROTECTED]]
......
You know, if one scores a +1 for structured complexity and +1 unstructured
complexity and we assume (from your implication) that higher complexity
scores are not to be preferred, then perhaps we can just put everything in
the index.cfm. No need for a CFswitch and we'll score a +0 for index.cfm,
we'll have a completely uncomplex file that is 30,000 lines long. :)
......
I believe XFB pushes a
project in all of those positive-result directions, and I heartily encourage
the skeptics to actually do a full non-trivial project with XFB, whatever
your former good habits are, to see for themselves.
......
IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee. It is confidential and may contain legally privileged
information. No confidentiality or privilege is waived or lost by any
mistaken transmission to you. If you receive this e-mail in error, please
immediately delete it from your system and notify the sender. You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient. The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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