> I read the previous posts and this one and I still can't figure out what
is
> being said here about QRY files.  Please explain.
>
> best,  paul
>

really just talking about Steve's technique of using <cfinclude> for QRY
inside index.cfm's fuseaction CFCASE , versus Hal's technique of
CFINCLUDEing the QRY inside the DSP/ACT page.

snippet examples:
================
Steve's:
<cfcase value="myfuseaction">
    <cfinclude template="queries/qry_MyQuery.cfm">
    <cfinclude template="dsp_MyQuery.cfm">
</cfcase>
==================
Hal's:
<cfcase value="myfuseaction">
    <cfinclude template="dspMyQuery.cfm">
</cfcase>

and inside dspMyQuery.cfm one has
<cfinclude template="queries/qry_MyQuery.cfm">
=================

my comment was that if there is ANY conditional logic, now or in the future,
to be added that may impact the QRY file, then very quickly the index.cfm is
going to look complex and crowded. There does not seem to be any argument
that one or the other technique is executionally faster (nor should there
be). It's a matter of stylistics. I like the idea of looking at the
index.cfm and having the 30,000 ft overview within one quick viewing. If
it's good enough to find nuclear missiles in Cuba, it's good enough for me.
:)

However, also on the theory that only the Architect should touch the
index.cfm file, I still lean towards Hal's solution, since changes to the
Programming or Database would then only ever involve the DSP and QRY files,
never the index.cfm.

And, finally, I'd point out that if one makes any changes to the index.cfm,
it is possible to break the entire app, since it is , after all , the
fusebox.  By keeping the granularity to the fuseaction templates, your
ability to break the application easily is substantially reduced, usually
limited only to that one fuseaction or its immediate exit points.

Again, in the simple examples above things are virtually the same. But start
doing some conditional logic to emulate (for example) the multi-record
multi-action functionality that you may have seen on eGroups.com mailing
list management page and suddenly the index.cfm doubles or triples in size
in size, since you must either start adding a lot of CFIF's inside the
CFCASE or adding a lot more fuseactions if the QRY's are in any way SQL-ly
unrelated.

Further, one then has to go to the individual template's Fusedocs to see the
documentation for something (the CFINCLUDE) that occurs in another template
(the index.cfm). To to fix any problem, a minimum of 3 files are opened with
Steve's method, whereas with Hal's only 2 are opened (a 50% increase.) .  I
admit this last argument is the weakest :)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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